*/ protected function casts(): array { return [ 'accepted_at' => 'datetime', ]; } /** * User that granted the consent. * * @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Legal document version that was accepted. * * @return BelongsTo */ public function document(): BelongsTo { return $this->belongsTo(LegalDocument::class, 'legal_document_id'); } }