$data * @property array $snapshot * @property int $version * @property string $record_key * @property \Illuminate\Support\Carbon $created_at */ class SupplyRecord extends Model { use BelongsToTenant; public $timestamps = false; protected $guarded = ['id']; /** @return array */ protected function casts(): array { return ['data' => 'array', 'snapshot' => 'array', 'created_at' => 'datetime']; } protected static function booted(): void { static::updating(fn () => throw new \LogicException('Criar uma nova versão.')); static::deleting(fn () => throw new \LogicException('Preservar histórico.')); } }