change layout
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package dao
|
||||
|
||||
import "lone-services/pkg/utils"
|
||||
|
||||
type JwtInfo struct {
|
||||
Id int64 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Avatar string `gorm:"column:avatar;type:varchar(255);comment:头像" json:"avatar"`
|
||||
Name string `gorm:"column:name;type:varchar(30);comment:真实姓名;NOT NULL" json:"name"`
|
||||
Phone string `gorm:"column:phone;type:char(12);comment:电话" json:"phone"`
|
||||
Email string `gorm:"column:email;type:varchar(255);comment:邮箱" json:"email"`
|
||||
LastTime utils.CustomTime `gorm:"column:last_time;type:datetime;comment:最后一次登录时间" json:"last_time"`
|
||||
Time int `json:"time"`
|
||||
Roles []JwtInfoServices `json:"roles"`
|
||||
Refresh string `json:"refresh"`
|
||||
}
|
||||
|
||||
type JwtOutInfo struct {
|
||||
Avatar string `json:"avatar"`
|
||||
Name string `json:"name"`
|
||||
Phone string `json:"phone"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
type Token struct {
|
||||
Token string `json:"token"`
|
||||
Refresh string `json:"refresh"`
|
||||
Info JwtOutInfo `json:"info"`
|
||||
}
|
||||
|
||||
type JwtInfoServices struct {
|
||||
Id int `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Name string `gorm:"column:name;type:varchar(255);comment:项目描述;NOT NULL" json:"name"`
|
||||
Items map[string]string `json:"items"`
|
||||
}
|
||||
Reference in New Issue
Block a user