✨ init project
This commit is contained in:
18
model/entity/oauth2_client.go
Normal file
18
model/entity/oauth2_client.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"Lee-WineList/common/types"
|
||||
)
|
||||
|
||||
// OAuth2Client OAuth2客户端信息
|
||||
type OAuth2Client struct {
|
||||
types.BaseDbModel
|
||||
ClientId string `gorm:"type:varchar(255) not null"`
|
||||
ClientSecret string `gorm:"type:varchar(255) not null"`
|
||||
Grant string `gorm:"type:varchar(255) not null"` // 允许的授权范围,支持类型: oauth2.GrantType
|
||||
Domain string `gorm:"type:varchar(255)"`
|
||||
}
|
||||
|
||||
func (OAuth2Client) TableName() string {
|
||||
return "t_oauth2_client"
|
||||
}
|
19
model/entity/user.go
Normal file
19
model/entity/user.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package entity
|
||||
|
||||
import (
|
||||
"Lee-WineList/common/types"
|
||||
)
|
||||
|
||||
// User 普通用户表
|
||||
type User struct {
|
||||
types.BaseDbModel
|
||||
Phone string `json:"phone" gorm:"index:deleted,unique;type:varchar(255) not null comment '手机号'"`
|
||||
UnionId string `json:"union_id" gorm:"type:varchar(255) comment '微信UnionId'"`
|
||||
OpenId string `json:"open_id" gorm:"type:varchar(255) comment '微信OpenId'"`
|
||||
Nickname string `json:"nickname" gorm:"type:varchar(255) comment '昵称'"`
|
||||
Avatar string `json:"avatar" gorm:"type:varchar(255) comment '头像'"`
|
||||
}
|
||||
|
||||
func (User) TableName() string {
|
||||
return "t_user"
|
||||
}
|
Reference in New Issue
Block a user