nezha/model/user.go

19 lines
337 B
Go
Raw Normal View History

2019-12-08 03:59:58 -05:00
package model
2024-12-16 06:40:37 -05:00
const (
RoleAdmin uint8 = iota
RoleMember
)
2019-12-08 03:59:58 -05:00
type User struct {
Common
Username string `json:"username,omitempty" gorm:"uniqueIndex"`
2024-10-20 02:05:43 -04:00
Password string `json:"password,omitempty" gorm:"type:char(72)"`
2024-12-16 06:40:37 -05:00
Role uint8 `json:"role,omitempty"`
2019-12-08 03:59:58 -05:00
}
type Profile struct {
User
LoginIP string `json:"login_ip,omitempty"`
}