*/ protected $fillable = [ 'user_id', 'consent_type', 'status', 'policy_version', 'consented_at', 'withdrawn_at', 'ip_address', 'user_agent_hash', 'metadata', ]; /** * @return array */ protected function casts(): array { return [ 'consented_at' => 'datetime', 'withdrawn_at' => 'datetime', 'metadata' => 'array', 'created_at' => 'datetime', 'updated_at' => 'datetime', ]; } /** * @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class); } }