Files
lone-services/admin/internal/dao/login.go
T
gjs 38a8a5cafb
CI / changes (push) Successful in 2s
CI / docker-bff (push) Successful in 2s
CI / docker-product (push) Failing after 1s
admin add edit status password items info
2026-08-08 16:06:36 +08:00

23 lines
913 B
Go

package dao
import (
"github.com/golang-jwt/jwt/v4"
"pkg.local/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"`
Roles string `gorm:"column:roles;type:varchar(255);comment:角色" json:"roles"`
LastTime utils.CustomTime `gorm:"column:last_time;type:datetime;comment:最后一次登录时间" json:"last_time"`
Time int `json:"time"`
jwt.RegisteredClaims
}
type Token struct {
Token string `json:"token"`
}