✨ 新增几大中心功能
This commit is contained in:
23
server/model/app/app_user.go
Normal file
23
server/model/app/app_user.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type AppUser struct {
|
||||
ID uint `json:"id" gorm:"primaryKey"`
|
||||
UUID uuid.UUID `json:"uuid" gorm:"index;not null;comment:用户UUID"`
|
||||
Username string `json:"username" gorm:"uniqueIndex;size:64;not null"`
|
||||
Password string `json:"-" gorm:"not null"`
|
||||
Enable int `json:"enable" gorm:"default:1;comment:1正常 2禁用"`
|
||||
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
UpdatedAt time.Time `json:"updatedAt"`
|
||||
}
|
||||
|
||||
func (AppUser) TableName() string {
|
||||
return "app_users"
|
||||
}
|
||||
Reference in New Issue
Block a user