draft
This commit is contained in:
15
backend/internal/model/admin_user.go
Normal file
15
backend/internal/model/admin_user.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
// AdminUser 管理后台用户
|
||||
func (AdminUser) TableName() string { return "admin_user" }
|
||||
|
||||
type AdminUser struct {
|
||||
ID uint64 `gorm:"primaryKey;autoIncrement"`
|
||||
Username string `gorm:"uniqueIndex;size:64;not null"`
|
||||
PasswordHash string `gorm:"size:128;not null"`
|
||||
Status int8 `gorm:"not null;default:1"` // 1=启用
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
Reference in New Issue
Block a user