This commit is contained in:
ljw
2024-09-13 15:57:29 +08:00
commit c53df223d1
112 changed files with 14353 additions and 0 deletions

18
model/user.go Normal file
View File

@@ -0,0 +1,18 @@
package model
type User struct {
IdModel
Username string `json:"username" gorm:"default:'';not null;index,unique"`
Password string `json:"-" gorm:"default:'';not null;"`
Nickname string `json:"nickname" gorm:"default:'';not null;"`
Avatar string `json:"avatar" gorm:"default:'';not null;"`
GroupId uint `json:"group_id" gorm:"default:0;not null;index"`
IsAdmin *bool `json:"is_admin" gorm:"default:0;not null;"`
Status StatusCode `json:"status" gorm:"default:1;not null;"`
TimeModel
}
type UserList struct {
Users []*User `json:"list,omitempty"`
Pagination
}