Files
sundynix-go/model/system/sys_user.go
T
2025-05-08 23:03:00 +08:00

30 lines
573 B
Go

package system
import (
"sundynix-go/global"
)
type Login interface {
GetAccount() string
GetUserId() uint
GetUserInfo() any
}
type User struct {
global.BaseModel
ClientId string `gorm:"size:20;" json:"clientId"`
Account string `gorm:"size:11;unique;" json:"account" form:"account"`
Password string `gorm:"size:100;" json:"-" form:"password"`
Phone string `gorm:"size:11;" json:"phone" form:"phone"`
}
func (u *User) GetAccount() string {
return u.Account
}
func (u *User) GetUserId() uint {
return u.Id
}
func (u *User) GetUserInfo() any {
return *u
}