feat: client 增删改查
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
package system
|
||||
|
||||
import "sundynix-go/global"
|
||||
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"`
|
||||
@@ -9,3 +16,14 @@ type User struct {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user