mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
43 lines
844 B
PHP
43 lines
844 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Classes\ValueObjects\Constants\SegmentConstants;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
/**
|
|
* Class SegmentConstant
|
|
* @package App\Models
|
|
*
|
|
* @property int $id
|
|
* @property int $segment_id
|
|
* @property string $reference
|
|
* @property array $detail
|
|
* @property array $value
|
|
*/
|
|
class SegmentConstant extends AbstractModel
|
|
{
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'segment_constants';
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'detail' => 'array',
|
|
'value' => 'array',
|
|
'deleted_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo
|
|
*/
|
|
public function segment(): BelongsTo
|
|
{
|
|
return $this->BelongsTo(Segment::class, 'segment_id', 'id');
|
|
}
|
|
|
|
}
|