b79d49d399
CI / changes (push) Successful in 13s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 1s
CI / bff (push) Successful in 0s
CI / chore (push) Successful in 0s
CI / express (push) Successful in 1s
CI / product (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / user (push) Successful in 0s
CI / wecom (push) Successful in 32s
47 lines
1.6 KiB
Go
47 lines
1.6 KiB
Go
package dao
|
|
|
|
import "lone-services/pkg/utils"
|
|
|
|
const (
|
|
UserTypeAdmin uint8 = 1 // 管理员
|
|
UserTypeSale uint8 = 2 // 销售
|
|
|
|
StatusEnabled uint8 = 1 // 启用
|
|
StatusDisabled uint8 = 2 // 禁用
|
|
)
|
|
|
|
// WecomUser 用户企业微信绑定
|
|
type WecomUser struct {
|
|
Id int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
|
|
UserId int64 `gorm:"column:user_id" json:"user_id"`
|
|
Type uint8 `gorm:"column:type" json:"type"`
|
|
WecomUserId string `gorm:"column:wecom_user_id" json:"wecom_user_id"`
|
|
Name string `gorm:"column:name" json:"name"`
|
|
Mobile string `gorm:"column:mobile" json:"mobile"`
|
|
Avatar string `gorm:"column:avatar" json:"avatar"`
|
|
Status uint8 `gorm:"column:status" json:"status"`
|
|
CreatedAt utils.CustomTime `gorm:"column:created_at" json:"created_at"`
|
|
UpdatedAt utils.CustomTime `gorm:"column:updated_at" json:"updated_at"`
|
|
}
|
|
|
|
type UserListItem struct {
|
|
Id int64 `json:"id"`
|
|
UserId int64 `json:"user_id"`
|
|
Type uint8 `json:"type"`
|
|
TypeText string `json:"type_text"`
|
|
Name string `json:"name"`
|
|
Mobile string `json:"mobile"`
|
|
OriginMobile string `json:"origin_mobile"`
|
|
Avatar string `json:"avatar"`
|
|
Status uint8 `json:"status"`
|
|
BizName string `json:"biz_name"`
|
|
WecomUserId string `json:"wecom_user_id"`
|
|
CreatedAt string `json:"created_at"`
|
|
UpdatedAt string `json:"updated_at"`
|
|
}
|
|
|
|
type UserTypeOption struct {
|
|
ID uint8 `json:"id"`
|
|
Name string `json:"name"`
|
|
}
|