Files
backend/src/app/Models/GdprConsent.php
T
bastien d95bfa6c58
Laverie/backend/pipeline/head There was a failure building this commit
Jenkins file
2026-07-04 22:42:58 +02:00

30 lines
777 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Attributes\Fillable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
#[Fillable(['user_id', 'type', 'accepted', 'policy_version', 'policy_text_hash', 'source', 'consent_language', 'ip_address', 'user_agent', 'accepted_at', 'revoked_at'])]
class GdprConsent extends Model
{
public $timestamps = false;
protected function casts(): array
{
return [
'type' => 'string',
'accepted' => 'boolean',
'source' => 'string',
'accepted_at' => 'datetime',
'revoked_at' => 'datetime',
];
}
public function user(): BelongsTo
{
return $this->belongsTo(User::class);
}
}