'datetime', 'password' => 'hashed', 'est_actif' => 'boolean', 'consentement_rgpd' => 'boolean', ]; } // ──── JWTSubject ──── public function getJWTIdentifier(): mixed { return $this->getKey(); } public function getJWTCustomClaims(): array { return [ 'role' => $this->role->nom, ]; } // ──── Relations ──── public function role(): BelongsTo { return $this->belongsTo(Role::class); } public function tracker(): HasOne { return $this->hasOne(Tracker::class); } public function contactsUrgence(): HasMany { return $this->hasMany(ContactUrgence::class); } // ──── Helpers ──── public function estAdmin(): bool { return $this->role->nom === 'administrateur'; } }