Files
Toiminnanohjaus/app/Modules/Machines/Infrastructure/Persistence/Eloquent/MachineQueueEntryModel.php
T
2026-11-26 16:43:55 +02:00

43 lines
1.4 KiB
PHP

<?php
namespace App\Modules\Machines\Infrastructure\Persistence\Eloquent;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Attributes\Table;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Carbon;
/**
* Persistence model, used only inside the Machines Infrastructure layer.
*
* @property int $id
* @property int $machine_id
* @property string $planned_on Y-m-d, kept as text so that it compares as a date in every database.
* @property int $position
* @property int|null $task_id
* @property int|null $quick_sale_order_line_id
* @property int|null $production_step_position
* @property Carbon|null $completed_at
* @property int|null $completed_by
*/
#[Table('machine_queue_entries')]
#[Fillable(['machine_id', 'planned_on', 'position', 'task_id', 'quick_sale_order_line_id', 'production_step_position', 'completed_at', 'completed_by'])]
class MachineQueueEntryModel extends Model
{
/**
* @return array<string, string>
*/
protected function casts(): array
{
return [
'machine_id' => 'integer',
'position' => 'integer',
'task_id' => 'integer',
'quick_sale_order_line_id' => 'integer',
'production_step_position' => 'integer',
'completed_at' => 'immutable_datetime',
'completed_by' => 'integer',
];
}
}