Add machines with day-by-day work lists for job tasks
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?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',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user