45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Carbon;
|
|
|
|
/**
|
|
* @property string $rule_code
|
|
* @property string $component
|
|
* @property string $scope_key
|
|
* @property string $status
|
|
* @property array<string, mixed> $rule_definition
|
|
* @property array<string, mixed> $parameters
|
|
* @property array<string, mixed> $rounding_policy
|
|
* @property int $author_id
|
|
* @property int|null $reviewer_id
|
|
* @property int|null $approver_id
|
|
* @property Carbon $valid_from
|
|
* @property Carbon|null $valid_until
|
|
*/
|
|
class SimulationTaxRuleVersion extends Model
|
|
{
|
|
use HasUuids;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'rule_definition' => 'array',
|
|
'parameters' => 'array',
|
|
'rounding_policy' => 'array',
|
|
'valid_from' => 'date:Y-m-d',
|
|
'valid_until' => 'date:Y-m-d',
|
|
'reviewed_at' => 'immutable_datetime',
|
|
'approved_at' => 'immutable_datetime',
|
|
'published_at' => 'immutable_datetime',
|
|
'suspended_at' => 'immutable_datetime',
|
|
'archived_at' => 'immutable_datetime',
|
|
];
|
|
}
|
|
}
|