*/ protected function casts(): array { return [ 'effective_from' => 'datetime', 'expires_at' => 'datetime', 'metadata' => 'array', 'decided_at' => 'datetime', ]; } protected static function booted(): void { static::updating(static function (): void { throw new LogicException('Finding exception decisions are append-only.'); }); static::deleting(static function (): void { throw new LogicException('Finding exception decisions are append-only.'); }); } /** * @return BelongsTo */ public function exception(): BelongsTo { return $this->belongsTo(FindingException::class, 'finding_exception_id'); } /** * @return BelongsTo */ public function actor(): BelongsTo { return $this->belongsTo(User::class, 'actor_user_id'); } }