'datetime', 'password' => 'hashed', ]; } // ─── Relationships ─────────────────────────────── public function wallet() { return $this->hasOne(Wallet::class); } // ─── Helper Methods (Role Checks) ──────────────── public function isSuperAdmin(): bool { return $this->hasRole('super_admin'); } public function isAdmin(): bool { return $this->hasAnyRole(['super_admin', 'admin']); } public function isStaff(): bool { return $this->hasRole('staff'); } public function isCustomer(): bool { return $this->hasRole('customer'); } // ─── Filament Panel Access ─────────────────────── public function canAccessPanel(\Filament\Panel $panel): bool { // فقط super_admin, admin, staff می‌توانند به پنل ادمین دسترسی داشته باشند // customer فقط از API استفاده می‌کند return $this->hasAnyRole(['super_admin', 'admin', 'staff']); } }