활동 로그 추적 필드 */ public static array $activityLogFields = [ 'subject' => ['label_key' => 'activity_log.fields.subject', 'type' => 'text'], 'body' => ['label_key' => 'activity_log.fields.body', 'type' => 'text'], 'is_active' => ['label_key' => 'activity_log.fields.is_active', 'type' => 'boolean'], 'is_default' => ['label_key' => 'activity_log.fields.is_default', 'type' => 'boolean'], ]; /** * @var string 테이블명 */ protected $table = 'mail_templates'; /** * @var array 기본 속성 값 */ protected $attributes = [ 'variables' => '[]', ]; /** * @var array Mass assignable 필드 */ protected $fillable = [ 'type', 'subject', 'body', 'variables', 'is_active', 'is_default', 'user_overrides', 'updated_by', ]; /** * @return array 타입 캐스팅 */ protected function casts(): array { return [ 'user_overrides' => 'array', ]; } /** * 마지막 수정자를 반환합니다. * * @return BelongsTo User 관계 */ public function updater(): BelongsTo { return $this->belongsTo(User::class, 'updated_by'); } }