Documentation ¶
Overview ¶
Package models 为项目所需的模型对象定义.
Index ¶
- Constants
- Variables
- func InitAccessToken(logger *logger.Client, db *gorm.DB) *accessToken
- func InitAddress(logger *logger.Client, db *gorm.DB) *address
- func InitAddressType(logger *logger.Client, db *gorm.DB) *addressType
- func InitAdminUser(logger *logger.Client, db *gorm.DB) *adminUser
- func InitAttachment(logger *logger.Client, db *gorm.DB) *attachment
- func InitBanner(logger *logger.Client, db *gorm.DB) *banner
- func InitCart(logger *logger.Client, db *gorm.DB) *cart
- func InitCom(logger *logger.Client, db *gorm.DB) *com
- func InitComCate(logger *logger.Client, db *gorm.DB) *comCate
- func InitComImage(logger *logger.Client, db *gorm.DB) *comImage
- func InitComRelateCate(logger *logger.Client, db *gorm.DB) *comRelateCate
- func InitComSku(logger *logger.Client, db *gorm.DB) *comSku
- func InitComSpec(logger *logger.Client, db *gorm.DB) *comSpec
- func InitComSpecValue(logger *logger.Client, db *gorm.DB) *comSpecValue
- func InitComStore(logger *logger.Client, db *gorm.DB) *comStore
- func InitComment(logger *logger.Client, db *gorm.DB) *comment
- func InitFreight(logger *logger.Client, db *gorm.DB) *freight
- func InitImage(logger *logger.Client, db *gorm.DB) *image
- func InitOrder(logger *logger.Client, db *gorm.DB) *order
- func InitOrderExtend(logger *logger.Client, db *gorm.DB) *orderExtend
- func InitOrderGoods(logger *logger.Client, db *gorm.DB) *orderGoods
- func InitOrderLog(logger *logger.Client, db *gorm.DB) *orderLog
- func InitOrderPay(logger *logger.Client, db *gorm.DB) *orderPay
- func InitPointLimit(logger *logger.Client, db *gorm.DB) *pointLimit
- func InitPointLog(logger *logger.Client, db *gorm.DB) *pointLog
- func InitSignin(logger *logger.Client, db *gorm.DB) *signin
- func InitSigninLog(logger *logger.Client, db *gorm.DB) *signinLog
- func InitUser(logger *logger.Client, db *gorm.DB) *user
- func InitUserGoods(logger *logger.Client, db *gorm.DB) *userGoods
- func InitUserOpen(logger *logger.Client, db *gorm.DB) *userOpen
- func InitWechatUser() *wechatUser
- type AccessTokenTicket
- type OrderCondition
- type OrderFull
- type OrderGoodsJson
- type RespOrderInfo
Constants ¶
View Source
const ( UserInit = 0 UserActived = 1 UserBanned = 2 )
View Source
const AccessTokenExpireInterval = 7 * 24 * 60 * 60
View Source
const AccessTokenIss = "github.com/i2eco/egoshop"
View Source
const AccessTokenKey = "ecologysK#xo"
View Source
const ComplainTimeLimit = 24 * 60 * 60 * 7
View Source
const (
GenreWechatMini = 3
)
View Source
const ORDER_EVALUATE_TIME = 1296000 // todo 需要可修改
Variables ¶
View Source
var ( ComSpecValue *comSpecValue Com *com User *user Signin *signin Order *order Address *address Freight *freight ComSpec *comSpec PointLimit *pointLimit ComSku *comSku Banner *banner OrderLog *orderLog OrderGoods *orderGoods ComImage *comImage AdminUser *adminUser OrderExtend *orderExtend AddressType *addressType Attachment *attachment Image *image PointLog *pointLog ComRelateCate *comRelateCate SigninLog *signinLog ComStore *comStore Comment *comment UserGoods *userGoods Cart *cart AccessToken *accessToken UserOpen *userOpen ComCate *comCate OrderPay *orderPay )
View Source
var ( // ErrMemberNoExist 用户不存在. ErrMemberNoExist = errors.New("用户不存在") ErrMemberExist = errors.New("用户已存在") ErrMemberDisabled = errors.New("用户被禁用") ErrMemberEmailEmpty = errors.New("用户邮箱不能为空") ErrMemberEmailExist = errors.New("用户邮箱已被使用") ErrMemberDescriptionTooLong = errors.New("用户描述必须小于500字") ErrMemberEmailFormatError = errors.New("邮箱格式不正确") ErrMemberPasswordFormatError = errors.New("密码必须在6-50个字符之间") ErrMemberAccountFormatError = errors.New("账号只能由英文字母数字组成,且在3-50个字符") ErrMemberRoleError = errors.New("用户权限不正确") // ErrorMemberPasswordError 密码错误. ErrorMemberPasswordError = errors.New("用户密码错误") //ErrorMemberAuthMethodInvalid 不支持此认证方式 ErrMemberAuthMethodInvalid = errors.New("不支持此认证方式") //ErrLDAPConnect 无法连接到LDAP服务器 ErrLDAPConnect = errors.New("无法连接到LDAP服务器") //ErrLDAPFirstBind 第一次LDAP绑定失败 ErrLDAPFirstBind = errors.New("第一次LDAP绑定失败") //ErrLDAPSearch LDAP搜索失败 ErrLDAPSearch = errors.New("LDAP搜索失败") //ErrLDAPUserNotFoundOrTooMany ErrLDAPUserNotFoundOrTooMany = errors.New("LDAP用户不存在或者多于一个") // ErrDataNotExist 指定的服务已存在. ErrDataNotExist = errors.New("数据不存在") // ErrInvalidParameter 参数错误. ErrInvalidParameter = errors.New("Invalid parameter") ErrPermissionDenied = errors.New("Permission denied") ErrCommentClosed = errors.New("评论已关闭") ErrCommentContentNotEmpty = errors.New("评论内容不能为空") )
View Source
var (
WechatUser *wechatUser
)
Functions ¶
func InitWechatUser ¶
func InitWechatUser() *wechatUser
Types ¶
type AccessTokenTicket ¶
type OrderCondition ¶
type OrderCondition struct { // 新增信息 IsCancel bool `json:"isCancel"` IsPay bool `json:"isPay"` IsRefundCancel bool `json:"isRefundCancel"` IsComplain bool `json:"isComplain"` IsReceive bool `json:"isReceive"` IsLock bool `json:"isLock"` IsDeliver bool `json:"isDeliver"` IsEvaluate bool `json:"isEvaluate"` }
type OrderFull ¶
type OrderFull struct { Order mysql.Order `json:"order"` StateDesc string `json:"stateDesc"` GroupStateDesc string `json:"groupStateDesc"` PaymentName string `json:"paymentName"` UserOpen mysql.UserOpen `json:"userOpen"` OrderExtend mysql.OrderExtend `json:"orderExtend"` OrderGoods []OrderGoodsJson `json:"orderGoods"` // 新增信息 IsCancel bool `json:"isCancel"` IsPay bool `json:"isPay"` IsRefundCancel bool `json:"isRefundCancel"` IsComplain bool `json:"isComplain"` IsReceive bool `json:"isReceive"` IsLock bool `json:"isLock"` IsDeliver bool `json:"isDeliver"` IsEvaluate bool `json:"isEvaluate"` }
type OrderGoodsJson ¶
type OrderGoodsJson struct { mysql.OrderGoods IsRefund bool `json:"isRefund"` }
type RespOrderInfo ¶
type RespOrderInfo struct { Info mysql.Order `gorm:"not null;"json:"info"` OrderCondition OrderCondition `gorm:"not null;"json:"orderCondition"` OrderLog []mysql.OrderLog `gorm:"not null;"json:"orderLog"` ExtendOrderExtend mysql.OrderExtend `gorm:"not null;"json:"extendOrderExtend"` ExtendOrderCom []mysql.OrderGoods `gorm:"not null;"json:"extendOrderCom"` }
Source Files ¶
- access_token.gen.addition.go
- access_token.gen.go
- address.gen.go
- address_type.gen.go
- admin_user.gen.go
- attachment.gen.go
- banner.gen.go
- cart.gen.addition.go
- cart.gen.go
- com.gen.go
- com_cate.gen.go
- com_image.gen.go
- com_relate_cate.gen.go
- com_sku.gen.go
- com_spec.gen.go
- com_spec_value.gen.go
- com_store.gen.go
- comment.gen.go
- declare.gen.addition.go
- declare.gen.go
- errors.go
- freight.gen.go
- image.gen.go
- order.gen.addition.go
- order.gen.go
- order_extend.gen.go
- order_goods.gen.go
- order_log.gen.go
- order_pay.gen.go
- point_limit.gen.go
- point_log.gen.go
- signin.gen.go
- signin_log.gen.go
- user.gen.addition.go
- user.gen.go
- user_goods.gen.addition.go
- user_goods.gen.go
- user_open.gen.go
- wechat_user.gen.addition.go
Click to show internal directories.
Click to hide internal directories.