HistoryEntryType::class, 'occurred_at' => 'datetime', ]; public function isFieldChange(): bool { return $this->type === HistoryEntryType::FieldChange; } public function client(): BelongsTo { return $this->belongsTo(Client::class); } public function entryType(): BelongsTo { return $this->belongsTo(HistoryType::class, 'history_entry_type_id'); } public function author(): BelongsTo { return $this->belongsTo(User::class, 'author_id'); } public function updatedBy(): BelongsTo { return $this->belongsTo(User::class, 'updated_by'); } protected static function newFactory(): HistoryEntryFactory { return HistoryEntryFactory::new(); } }