init project

This commit is contained in:
2023-04-24 17:19:41 +08:00
parent 84729ebb66
commit cdb5a4f9cd
51 changed files with 3328 additions and 1 deletions

View 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
View 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"
}