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:
+35
@@ -0,0 +1,35 @@
|
||||
<?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_counter_id
|
||||
* @property int $reading_milli
|
||||
* @property int $user_id
|
||||
* @property Carbon $read_at
|
||||
*/
|
||||
#[Table('machine_counter_readings')]
|
||||
#[Fillable(['machine_counter_id', 'reading_milli', 'user_id', 'read_at'])]
|
||||
class MachineCounterReadingModel extends Model
|
||||
{
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'machine_counter_id' => 'integer',
|
||||
'reading_milli' => 'integer',
|
||||
'user_id' => 'integer',
|
||||
'read_at' => 'immutable_datetime',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user