This commit is contained in:
hashbro
2026-08-09 02:08:42 +08:00
parent 74a67c3900
commit 5c7600744e
24 changed files with 1510 additions and 70 deletions
+17 -2
View File
@@ -6,15 +6,25 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
class Admin extends Authenticatable
{
protected $fillable = ['username', 'password', 'is_super'];
protected $fillable = [
'username',
'password',
'is_super',
'status',
'google_auth_open',
'google_secret',
'last_ip',
];
protected $hidden = ['password', 'remember_token'];
protected $hidden = ['password', 'remember_token', 'google_secret'];
protected function casts(): array
{
return [
'password' => 'hashed',
'is_super' => 'integer',
'status' => 'integer',
'google_auth_open' => 'integer',
];
}
@@ -22,4 +32,9 @@ class Admin extends Authenticatable
{
return (int) $this->is_super === 1;
}
public function isEnabled(): bool
{
return (int) $this->status === 1;
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ class Channel extends Model
}
/**
* Domains for support-link display and builder deployment_domains.
* Domains for support-link display and builder channel hosts.
* Channel row wins; otherwise CORUNA_LAB_CHANNEL_DOMAINS.
*
* @return list<string>