feat: client 增删改查

This commit is contained in:
Blizzard
2025-05-08 23:03:00 +08:00
parent 75e9157e5e
commit ab51ba91bc
41 changed files with 1093 additions and 57 deletions
+19 -1
View File
@@ -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
}