mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
57 lines
1.2 KiB
PHP
57 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
/**
|
|
* Class SeasonalSegment
|
|
* @package App\Models
|
|
*
|
|
* @property int $company_id
|
|
* @property int $transferable_bank_id
|
|
* @property string $marking
|
|
* @property string $reference
|
|
* @property float $fix_amount
|
|
* @property int $convertible_currency_id
|
|
* @property int $conversion_currency_id
|
|
*/
|
|
class SeasonalSegment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
use SoftDeletes;
|
|
|
|
protected $table = 'seasonal_segment';
|
|
|
|
/**
|
|
* Get the attributes that should be cast.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'starting_on' => 'datetime',
|
|
'ending_on' => 'datetime',
|
|
'deleted_at' => 'datetime',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @return BelongsTo
|
|
*/
|
|
public function company(): BelongsTo
|
|
{
|
|
return $this->BelongsTo(Company::class, 'company_id', 'id');
|
|
}
|
|
|
|
public function segment()
|
|
{
|
|
return $this->belongsTo(Segment::class);
|
|
}
|
|
}
|