$notifications * @property-read \App\Models\PasswordReset|null $resetToken * * @mixin \Eloquent */ #[Fillable([ 'email', 'username', ])] class Customer extends Authenticatable implements CustomerDetails, MustVerifyEmail { use HasUuidV7AsPrimaryKey; use Notifiable; #[\Override] protected function casts(): array { return [ 'email' => EmailCast::class, 'hashcode' => CrmHashcodeCast::class, 'last_login_at' => 'datetime', ]; } #[\Override] public function getAuthPassword(): string { return $this->hashcode->value; } #[\Override] public function getEmailForVerification() { return $this->email->value; } #[\Override] public function getEmailForPasswordReset() { return $this->email->value; } /** NOTE: Overload \Illuminate\Notifications\Notifiable trait */ public function routeNotificationForMail(): string { return $this->email->value; } public function getId(): ShopperId { return new ShopperId(Uuid::fromString($this->id)); } /** @return \Illuminate\Database\Eloquent\Relations\HasOne<\App\Models\Employee,$this> */ public function employee(): HasOne { return $this->hasOne(Employee::class, 'customer_id'); } /** @return \Illuminate\Database\Eloquent\Relations\HasOne<\App\Models\PasswordReset,$this> */ public function resetToken(): HasOne { return $this->hasOne(PasswordReset::class, 'email', 'email'); } }