Lee-WineList/model/entity/user.go
2023-04-24 17:19:41 +08:00

20 lines
599 B
Go

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