mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-24 23:14:04 +00:00
62 lines
1.8 KiB
PHP
62 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Eloquent;
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* App\Models\OrderRole
|
|
*
|
|
* @property int $id
|
|
* @property int $order_id
|
|
* @property int $company_module_id
|
|
* @property int $role_id
|
|
* @property string|null $entity_hash_id
|
|
* @property string|null $entity_signature
|
|
* @property string|null $deleted_at
|
|
* @property Carbon|null $created_at
|
|
* @property Carbon|null $updated_at
|
|
* @property-read CompanyModule|null $Appointee
|
|
* @property-read Order|null $Order
|
|
* @method static Builder|OrderRole newModelQuery()
|
|
* @method static Builder|OrderRole newQuery()
|
|
* @method static Builder|OrderRole query()
|
|
* @method static Builder|OrderRole whereCompanyModuleId($value)
|
|
* @method static Builder|OrderRole whereCreatedAt($value)
|
|
* @method static Builder|OrderRole whereDeletedAt($value)
|
|
* @method static Builder|OrderRole whereEntityHashId($value)
|
|
* @method static Builder|OrderRole whereEntitySignature($value)
|
|
* @method static Builder|OrderRole whereId($value)
|
|
* @method static Builder|OrderRole whereOrderId($value)
|
|
* @method static Builder|OrderRole whereRoleId($value)
|
|
* @method static Builder|OrderRole whereUpdatedAt($value)
|
|
* @mixin Eloquent
|
|
*/
|
|
class OrderRole extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = ['entity_hash_id', 'entity_signature'];
|
|
|
|
/**
|
|
* @return BelongsTo
|
|
*/
|
|
public function Order(): BelongsTo
|
|
{
|
|
return $this->BelongsTo( Order::class, 'order_id', 'id');
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo
|
|
*/
|
|
public function Appointee(): BelongsTo
|
|
{
|
|
return $this->BelongsTo( CompanyModule::class, 'company_module_id', 'id');
|
|
}
|
|
}
|