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 {
|
2020-12-19 10:11:16 -05:00
|
|
|
Common
|
2024-10-22 09:19:30 -04:00
|
|
|
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
|
|
|
}
|
2024-11-23 03:22:22 -05:00
|
|
|
|
|
|
|
type Profile struct {
|
|
|
|
User
|
|
|
|
LoginIP string `json:"login_ip,omitempty"`
|
|
|
|
}
|