30 lines
773 B
PHP
30 lines
773 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Concerns\AppendOnlyInventoryRecord;
|
|
use App\Models\Concerns\BelongsToTenant;
|
|
use Carbon\CarbonInterface;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* @property array<string, mixed> $snapshot
|
|
* @property int|null $equipment_id
|
|
* @property int|null $spare_part_id
|
|
* @property CarbonInterface $recorded_at
|
|
*/
|
|
class StockOperation extends Model
|
|
{
|
|
use AppendOnlyInventoryRecord, BelongsToTenant;
|
|
|
|
public $timestamps = false;
|
|
|
|
protected $guarded = ['id'];
|
|
|
|
/** @return array<string, string> */
|
|
protected function casts(): array
|
|
{
|
|
return ['snapshot' => 'array', 'recorded_at' => 'datetime', 'quantity_milli' => 'integer', 'theoretical_milli' => 'integer', 'ledger_version' => 'integer'];
|
|
}
|
|
}
|