Documentation ¶
Index ¶
- func Orm() *gorm.DB
- func Paging(db *gorm.DB, pageIndex, pageSize int, dataType IDataBaseFace) result.Pager
- type Address
- type Admin
- type AnswerQuestion
- type BaseDao
- func (b BaseDao) Add(DB *gorm.DB, target interface{}) error
- func (b BaseDao) ChangeMap(DB *gorm.DB, ID uint64, model interface{}, params map[string]interface{}) error
- func (b BaseDao) ChangeModel(DB *gorm.DB, ID uint64, target interface{}) error
- func (b BaseDao) DatatablesListOrder(Orm *gorm.DB, params *Datatables, target interface{}, OID uint64, where string, ...) (draw int, recordsTotal int, recordsFiltered int, list interface{})
- func (b BaseDao) Delete(DB *gorm.DB, target interface{}, ID uint64) error
- func (b BaseDao) DeleteWhere(DB *gorm.DB, target interface{}, where interface{}, args ...interface{}) error
- func (b BaseDao) FindAll(DB *gorm.DB, target interface{}) error
- func (b BaseDao) FindAllByOID(DB *gorm.DB, target interface{}, OID uint64) error
- func (b BaseDao) FindOrderWhere(DB *gorm.DB, Order interface{}, target interface{}, where interface{}, ...) error
- func (b BaseDao) FindOrderWhereLength(DB *gorm.DB, Order interface{}, target interface{}, Length int) error
- func (b BaseDao) FindSelectWherePaging(DB *gorm.DB, Select string, Order interface{}, target IDataBaseFace, ...) result.Pager
- func (b BaseDao) FindWhere(DB *gorm.DB, target interface{}, where interface{}, args ...interface{}) error
- func (b BaseDao) FindWhereByOID(DB *gorm.DB, target interface{}, OID uint64, where interface{}, ...) error
- func (b BaseDao) FindWherePaging(DB *gorm.DB, Order interface{}, target IDataBaseFace, Index int, ...) result.Pager
- func (b BaseDao) Get(DB *gorm.DB, ID uint64, target interface{}) error
- func (b BaseDao) Save(DB *gorm.DB, target interface{}) error
- type BaseModel
- type CardItem
- type Collage
- type CollageGoods
- type CollageRecord
- type Columns
- type Configuration
- type Content
- type ContentConfig
- type ContentItem
- type ContentItemContentSubType
- type ContentSubType
- type ContentType
- type ContentTypeType
- type Custom
- type Datatables
- type Discount
- type District
- type ExpressTemplate
- type ExpressTemplateFreeItem
- type ExpressTemplateItem
- type ExpressTemplateNMW
- type ExpressTemplateTemplate
- type FullCut
- type GiveVoucher
- type Goods
- type GoodsInfo
- type GoodsParams
- type GoodsReview
- type GoodsType
- type GoodsTypeChild
- type GoodsTypeData
- type GoodsTypeGoodsTypeChild
- type GoodsTypeItem
- type GoodsTypeItemSub
- type IDataBaseFace
- type KV
- type Logger
- type Manager
- type Menus
- type MenusData
- type MenusSub
- type Order
- type Orders
- type OrdersGoods
- type OrdersGoodsInfo
- type OrdersPackage
- type Organization
- type OrganizationJournal
- type Profiling
- type Question
- type QuestionTag
- type Rank
- type RefundInfo
- type ScoreGoods
- type ScoreJournal
- type Search
- type ShoppingCart
- type Specification
- type Store
- type StoreJournal
- type StoreStock
- type SupplyOrders
- type TimeSell
- type TimeSellGoods
- type Transfers
- type User
- type UserFormIds
- type UserInfo
- type UserJournal
- type Verification
- type Voucher
- type WxConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Address ¶
type Admin ¶
type AnswerQuestion ¶
type AnswerQuestion struct { BaseModel UserID uint64 QuestionID uint64 Content string Praise uint64 }
func (AnswerQuestion) TableName ¶
func (AnswerQuestion) TableName() string
type BaseDao ¶
type BaseDao struct { }
func (BaseDao) ChangeModel ¶
func (BaseDao) DatatablesListOrder ¶
func (b BaseDao) DatatablesListOrder(Orm *gorm.DB, params *Datatables, target interface{}, OID uint64, where string, whereValues ...interface{}) (draw int, recordsTotal int, recordsFiltered int, list interface{})
`{"draw":1,"columns":[ {"data":"ID","name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}}, {"data":"Name","name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}}, {"data":"Grade","name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}}, {"data":"Province","name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}}, {"data":"City","name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}}, {"data":"County","name":"","searchable":true,"orderable":true,"search":{"value":"","regex":false}} ],"order":[ {"column":0,"dir":"asc"} ],"start":0,"length":10,"search":{"value":"","regex":false}}`
func (BaseDao) DeleteWhere ¶
func (b BaseDao) DeleteWhere(DB *gorm.DB, target interface{}, where interface{}, args ...interface{}) error
func (b BaseDao) UnscopedDeleteWhere(DB *gorm.DB, target interface{}, where interface{}, args ...interface{}) error { //db.Where("email LIKE ?", "%jinzhu%").Delete(Email{}) //DB *gorm.DB, target interface{}, where interface{} return DB.Unscoped().Where(where, args...).Delete(target).Error }
func (b BaseDao) UnscopedDelete(DB *gorm.DB, target interface{}, ID uint64) error {
return DB.Unscoped().Delete(target, "ID=?", ID).Error }
func (BaseDao) FindAllByOID ¶
func (BaseDao) FindOrderWhere ¶
func (BaseDao) FindOrderWhereLength ¶
func (BaseDao) FindSelectWherePaging ¶
func (BaseDao) FindWhereByOID ¶
func (BaseDao) FindWherePaging ¶
type CardItem ¶
type CardItem struct { BaseModel OrderNo string `gorm:"column:OrderNo;unique"` //订单号 UserID uint64 `gorm:"column:UserID"` // Type string `gorm:"column:Type"` //OrdersGoods,Voucher,ScoreGoods OrdersGoodsID uint64 `gorm:"column:OrdersGoodsID"` // VoucherID uint64 `gorm:"column:VoucherID"` // ScoreGoodsID uint64 `gorm:"column:ScoreGoodsID"` // Data string `gorm:"column:Data;type:text"` //json数据 Quantity uint `gorm:"column:Quantity"` //数量 UseQuantity uint `gorm:"column:UseQuantity"` //已经使用数量 ExpireTime time.Time `gorm:"column:ExpireTime"` //过期时间 PostType int `gorm:"column:PostType"` //1=邮寄,2=线下使用 }
卡
func (CardItem) GetNameLabel ¶
type Collage ¶
type Collage struct { BaseModel OID uint64 `gorm:"column:OID"` Hash string `gorm:"column:Hash"` //同一个Hash表示同一个活动 Num int `gorm:"column:Num"` //拼团人数 Discount int `gorm:"column:Discount"` // 折扣 TotalNum int `gorm:"column:TotalNum"` //总拼团产品数量 }
拼团
type CollageGoods ¶
type CollageGoods struct { BaseModel OID uint64 `gorm:"column:OID"` CollageHash string `gorm:"column:CollageHash"` GoodsID uint64 `gorm:"column:GoodsID"` Disable bool `gorm:"column:Disable"` //限时抢购中,单个商品是暂时 }
拼团商品
func (CollageGoods) TableName ¶
func (CollageGoods) TableName() string
type CollageRecord ¶
type CollageRecord struct { BaseModel OrderNo string `gorm:"column:OrderNo"` OrdersGoodsNo string `gorm:"column:OrdersGoodsNo"` No string `gorm:"column:No"` UserID uint64 `gorm:"column:UserID"` Collager uint64 `gorm:"column:Collager"` }
拼团记录
func (CollageRecord) TableName ¶
func (CollageRecord) TableName() string
type Configuration ¶
type Configuration struct { BaseModel OID uint64 `gorm:"column:OID"` K sqltype.ConfigurationKey `gorm:"column:K"` V string `gorm:"column:V"` }
func (*Configuration) BeforeCreate ¶
func (u *Configuration) BeforeCreate(scope *gorm.Scope) (err error)
func (Configuration) TableName ¶
func (Configuration) TableName() string
type Content ¶
type Content struct { BaseModel Title string `gorm:"column:Title"` Keywords string `gorm:"column:Keywords"` Description string `gorm:"column:Description"` Introduce string `gorm:"column:Introduce"` Content string `gorm:"column:Content;type:LONGTEXT"` Picture string `gorm:"column:Picture"` ContentItemID uint64 `gorm:"column:ContentItemID"` ContentSubTypeID uint64 `gorm:"column:ContentSubTypeID"` FromUrl string `gorm:"column:FromUrl"` Author string `gorm:"column:Author"` Look int `gorm:"column:Look"` }
type ContentConfig ¶ added in v1.0.3
type ContentConfig struct { BaseModel OID uint64 `gorm:"column:OID;unique"` Name string `gorm:"column:Name"` Logo string `gorm:"column:Logo"` SocialAccount sqltype.SocialAccountList `gorm:"column:SocialAccount;type:JSON"` CustomerService sqltype.CustomerServiceList `gorm:"column:CustomerService;type:JSON"` EnableHTMLCache bool `gorm:"column:EnableHTMLCache"` FocusPicture sqltype.FocusPictureList `gorm:"column:FocusPicture;type:JSON"` }
func (ContentConfig) TableName ¶ added in v1.0.3
func (ContentConfig) TableName() string
type ContentItem ¶
type ContentItem struct { BaseModel OID uint64 `gorm:"column:OID"` Name string `gorm:"column:Name"` Sort int `gorm:"column:Sort"` ContentTypeID uint64 `gorm:"column:ContentTypeID"` TemplateName string `gorm:"column:TemplateName"` //使用模板的文件名,如多文章列表, Type ContentTypeType `gorm:"column:Type"` Hide bool `gorm:"column:Hide"` }
Menus
func (ContentItem) TableName ¶
func (ContentItem) TableName() string
type ContentItemContentSubType ¶
type ContentItemContentSubType struct { ContentItem `gorm:"column:ContentItem"` ContentSubType `gorm:"column:ContentSubType"` }
type ContentSubType ¶
type ContentSubType struct { BaseModel Name string `gorm:"column:Name"` ContentItemID uint64 `gorm:"column:ContentItemID"` ParentContentSubTypeID uint64 `gorm:"column:ParentContentSubTypeID"` Sort int `gorm:"column:Sort"` }
Classify
func (ContentSubType) TableName ¶
func (ContentSubType) TableName() string
type ContentType ¶
type ContentType struct { BaseModel Label string `gorm:"column:Label"` Type ContentTypeType `gorm:"column:Type;unique"` }
MenuType
func (ContentType) TableName ¶
func (ContentType) TableName() string
type ContentTypeType ¶
type ContentTypeType string
const ContentTypeBlog ContentTypeType = "blog"
const ContentTypeContent ContentTypeType = "content"
const ContentTypeContents ContentTypeType = "contents"
const ContentTypeGallery ContentTypeType = "gallery"
const ContentTypeIndex ContentTypeType = "index"
const ContentTypeProducts ContentTypeType = "products"
type Datatables ¶
type Datatables struct { //Columns []map[string]interface{} `schema:"columns"` Columns []Columns `json:"columns"` Customs []Custom `json:"Customs"` Order []Order `json:"order"` Start int `json:"start"` Length int `json:"length"` Search Search `json:"search"` Draw int `json:"draw"` Groupbys []string NotIDs []uint64 InIDs []uint64 }
type District ¶
type District struct { BaseModel Code string `gorm:"column:Code;primary_key;unique"` Name string `gorm:"column:Name"` }
省市
type ExpressTemplate ¶
type ExpressTemplate struct { BaseModel OID uint64 `gorm:"column:OID"` Name string `gorm:"column:Name"` Drawee string `gorm:"column:Drawee"` //付款人 Type string `gorm:"column:Type"` //KG ITEM Template string `gorm:"column:Template;type:text"` //json Free string `gorm:"column:Free;type:text"` //json [] }
func (*ExpressTemplate) BeforeCreate ¶
func (u *ExpressTemplate) BeforeCreate(scope *gorm.Scope) (err error)
func (ExpressTemplate) TableName ¶
func (u ExpressTemplate) TableName() string
type ExpressTemplateFreeItem ¶
[{"Areas":["上海","江西省","山东省"],"Type":"N","N":1,"$$hashKey":"object:67"}, {"Areas":["海南省","青海省","陕西省"],"Type":"M","M":3,"$$hashKey":"object:70"}, {"Areas":["新疆维吾尔自治区","重庆","四川省"],"Type":"NM","N":3,"M":3,"$$hashKey":"object:73"}]
func (ExpressTemplateFreeItem) IsFree ¶
func (etfi ExpressTemplateFreeItem) IsFree(et ExpressTemplate, nmw ExpressTemplateNMW) bool
et 快递模板 nmw 包邮方式
type ExpressTemplateItem ¶
func (ExpressTemplateItem) CalculateExpressPrice ¶
func (etfi ExpressTemplateItem) CalculateExpressPrice(et ExpressTemplate, nmw ExpressTemplateNMW) uint64
type ExpressTemplateNMW ¶
type ExpressTemplateTemplate ¶
type ExpressTemplateTemplate struct { //{"Default":{"Areas":[],"N":4,"M":4,"AN":4,"ANM":4},"Items":[{"Areas":["江西省","上海"],"N":4,"M":4,"AN":4,"ANM":4,"$$hashKey":"object:144"}]} Default ExpressTemplateItem Items []ExpressTemplateItem }
type FullCut ¶
type FullCut struct { BaseModel OID uint64 `gorm:"column:OID"` Amount uint64 `gorm:"column:Amount"` CutAmount uint64 `gorm:"column:CutAmount"` }
满减
type GiveVoucher ¶
type GiveVoucher struct { BaseModel OID uint64 `gorm:"column:OID"` ScoreMaxValue uint64 `gorm:"column:ScoreMaxValue"` VoucherID uint64 `gorm:"column:VoucherID"` }
条件增送优惠卷
func (*GiveVoucher) BeforeCreate ¶
func (u *GiveVoucher) BeforeCreate(scope *gorm.Scope) (err error)
func (GiveVoucher) TableName ¶
func (GiveVoucher) TableName() string
type Goods ¶
type Goods struct { BaseModel OID uint64 `gorm:"column:OID"` Title string `gorm:"column:Title"` GoodsTypeID uint64 `gorm:"column:GoodsTypeID"` GoodsTypeChildID uint64 `gorm:"column:GoodsTypeChildID"` Price uint64 `gorm:"column:Price"` Stock uint `gorm:"column:Stock"` Hide uint `gorm:"column:Hide"` Images string `gorm:"column:Images;type:text;"` //json array Videos string `gorm:"column:Videos;type:text;"` //json array Summary string `gorm:"column:Summary;type:text"` Introduce string `gorm:"column:Introduce;type:text"` Pictures string `gorm:"column:Pictures;type:text;"` //json array Params string `gorm:"column:Params;type:text;"` //json array //TimeSellID uint64 `gorm:"column:TimeSellID"` // ExpressTemplateID uint64 `gorm:"column:ExpressTemplateID"` // CountSale uint64 `gorm:"column:CountSale"` //销售量 Mark string `gorm:"column:Mark"` }
商品
type GoodsInfo ¶
type GoodsInfo struct { Goods Goods Specifications []Specification Discounts []Discount }
type GoodsParams ¶
type GoodsReview ¶
type GoodsReview struct { BaseModel GoodsID uint64 Content string Portrait string NickName string Helpful uint64 BuySpecification string Star uint64 }
helpful
func (GoodsReview) TableName ¶
func (GoodsReview) TableName() string
type GoodsType ¶
type GoodsTypeChild ¶
type GoodsTypeChild struct { BaseModel //OID uint64 `gorm:"column:OID"` Name string `gorm:"column:Name"` Image string `gorm:"column:Image"` GoodsTypeID uint64 `gorm:"column:GoodsTypeID"` }
func (GoodsTypeChild) TableName ¶
func (GoodsTypeChild) TableName() string
func (u *GoodsTypeChild) BeforeCreate(scope *gorm.Scope) (err error) { if u.OID == 0 { defer func() { if err := recover(); err != nil { debug.PrintStack() } }() panic(errors.New(u.TableName() + ":OID不能为空")) return nil } return nil }
type GoodsTypeData ¶
type GoodsTypeData struct { List []*GoodsTypeItem ID uint64 SubID uint64 Top *GoodsTypeItem Sub *GoodsTypeItemSub }
func (*GoodsTypeData) Get ¶
func (m *GoodsTypeData) Get(ID uint64) *GoodsTypeItem
func (*GoodsTypeData) SetCurrentMenus ¶
func (m *GoodsTypeData) SetCurrentMenus(ID, SubID uint64)
type GoodsTypeGoodsTypeChild ¶
type GoodsTypeGoodsTypeChild struct { GoodsType `gorm:"column:GoodsType"` GoodsTypeChild `gorm:"column:GoodsTypeChild"` }
type GoodsTypeItem ¶
type GoodsTypeItem struct { Item *GoodsType SubType []*GoodsTypeItemSub }
func (GoodsTypeItem) Get ¶
func (m GoodsTypeItem) Get(ID uint64) *GoodsTypeItemSub
type GoodsTypeItemSub ¶
type GoodsTypeItemSub struct { Item *GoodsTypeChild SubType []*GoodsTypeItemSub }
func (*GoodsTypeItemSub) Get ¶
func (m *GoodsTypeItemSub) Get(ID uint64) *GoodsTypeItemSub
type IDataBaseFace ¶
type IDataBaseFace interface {
TableName() string
}
type Logger ¶
type Manager ¶
type Menus ¶
type Menus struct { Item ContentItem SubType []MenusSub }
type MenusData ¶
type MenusData struct { List []Menus ID uint64 SubID uint64 SubChildID uint64 Top Menus Sub MenusSub SubChild MenusSub }
func (*MenusData) SetCurrentMenus ¶
type MenusSub ¶
type MenusSub struct { Item ContentSubType SubType []MenusSub }
type Orders ¶
type Orders struct { BaseModel OID uint64 `gorm:"column:OID"` // UserID uint64 `gorm:"column:UserID"` //用户ID PrepayID string `gorm:"column:PrepayID"` // IsPay uint64 `gorm:"column:IsPay"` //是否支付成功,0=未支付,1,支付成功,2过期 OrderNo string `gorm:"column:OrderNo;unique"` //订单号 OrdersPackageNo string `gorm:"column:OrdersPackageNo"` //订单号 PayMoney uint64 `gorm:"column:PayMoney"` //支付价 PostType int `gorm:"column:PostType"` //1=邮寄,2=线下使用 Status string `gorm:"column:Status"` //状态 ShipNo string `gorm:"column:ShipNo"` //快递单号 ShipName string `gorm:"column:ShipName"` //快递 Address string `gorm:"column:Address"` //收货地址 json DeliverTime time.Time `gorm:"column:DeliverTime"` //发货时间 ReceiptTime time.Time `gorm:"column:ReceiptTime"` //确认收货时间 RefundTime time.Time `gorm:"column:RefundTime"` //申请退款退货时间 PayTime time.Time `gorm:"column:PayTime"` //支付时间 DiscountMoney uint `gorm:"column:DiscountMoney"` //相关活动的折扣金额,目前只有满减。 GoodsMoney uint `gorm:"column:GoodsMoney"` //商品总价 ExpressMoney uint `gorm:"column:ExpressMoney"` //运费 }
订单信息
type OrdersGoods ¶
type OrdersGoods struct { BaseModel OID uint64 `gorm:"column:OID"` OrdersGoodsNo string `gorm:"column:OrdersGoodsNo;unique"` // Status string `gorm:"column:Status"` //OGAskRefund,OGRefundNo,OGRefundOk,OGRefundInfo,OGRefundComplete RefundInfo string `gorm:"column:RefundInfo;type:text"` //RefundInfo json 退款退货信息 OrdersID uint64 `gorm:"column:OrdersID"` // Goods string `gorm:"column:Goods;type:text"` //josn Specification string `gorm:"column:Specification;type:text"` //json Discounts string `gorm:"column:Discounts;type:JSON"` Quantity uint `gorm:"column:Quantity"` //数量 CostPrice uint64 `gorm:"column:CostPrice"` //单价-原价 SellPrice uint64 `gorm:"column:SellPrice"` //单价-销售价 TotalBrokerage uint64 `gorm:"column:TotalBrokerage"` //总佣金 Error string `gorm:"column:Error"` // }
func (OrdersGoods) AddError ¶
func (og OrdersGoods) AddError(err string)
func (OrdersGoods) TableName ¶
func (OrdersGoods) TableName() string
type OrdersGoodsInfo ¶
type OrdersGoodsInfo struct { OrdersGoods OrdersGoods Discounts []Discount }
type OrdersPackage ¶
type OrdersPackage struct { BaseModel OrderNo string `gorm:"column:OrderNo;unique"` //订单号 //OrderList string `gorm:"column:OrderList;type:text"` //json [] TotalPayMoney uint64 `gorm:"column:TotalPayMoney"` //支付价 IsPay uint64 `gorm:"column:IsPay"` //是否支付成功,0=未支付,1,支付成功,2过期 PrepayID string `gorm:"column:PrepayID"` // UserID uint64 `gorm:"column:UserID"` //用户ID }
合并支付
func (OrdersPackage) TableName ¶
func (OrdersPackage) TableName() string
type Organization ¶
type Organization struct { BaseModel Domain string `gorm:"column:Domain;not null;unique"` //三级域名 Name string `gorm:"column:Name;not null"` //店名 Amount uint64 `gorm:"column:Amount;default:'0'"` //现金 BlockAmount uint64 `gorm:"column:BlockAmount;default:'0'"` //冻结现金 //Province string `gorm:"column:Province"` //省 //City string `gorm:"column:City"` //市 //District string `gorm:"column:District"` //区域 Address string `gorm:"column:Address"` //街道地址 Telephone string `gorm:"column:Telephone"` //手机 Email string `gorm:"column:Email"` //联系邮箱 Categories string `gorm:"column:Categories"` //门店的类型 Longitude float64 `gorm:"column:Longitude"` //地理位置 Latitude float64 `gorm:"column:Latitude"` //地理位置 Photos sqltype.StringArray `gorm:"column:Photos;type:JSON;default:'[]'"` //店的图片 Special string `gorm:"column:Special"` //特色 Opentime string `gorm:"column:Opentime"` //营业时间 Avgprice int `gorm:"column:Avgprice"` //每人平均消费 Introduction string `gorm:"column:Introduction;type:mediumtext"` //介绍 Recommend string `gorm:"column:Recommend"` //推荐 Link string `gorm:"column:Link"` //链接 Vip int `gorm:"column:Vip;default:'0'"` //VIP等级 Expire time.Time `gorm:"column:Expire"` //过期时间 }
func (Organization) TableName ¶
func (Organization) TableName() string
type OrganizationJournal ¶
type OrganizationJournal struct { BaseModel OID uint64 `gorm:"column:OID"` //OID Name string `gorm:"column:Name;not null"` // Detail string `gorm:"column:Detail;not null"` // Type int `gorm:"column:Type;default:'0'"` //ddddd Amount int64 `gorm:"column:Amount;default:'0'"` // Balance uint64 `gorm:"column:Balance;default:'0'"` // DataKV string `gorm:"column:DataKV;type:text"` //{Key:"",Value:""} }
Organization 商店账目明细
func (OrganizationJournal) TableName ¶
func (OrganizationJournal) TableName() string
type Question ¶
type Question struct { BaseModel UserID uint64 `gorm:"column:UserID"` // Title string `gorm:"column:Title"` // Describe string `gorm:"column:Describe;type:text"` //描述 Link string `gorm:"column:Link"` //相关链接 Long float64 `gorm:"column:Long"` // Lat float64 `gorm:"column:Lat"` // AtLocal bool `gorm:"column:AtLocal"` //是否针对本地 Attachment string `gorm:"column:Attachment;type:text"` //附件json,图片,文件等 QuestionTagID uint64 `gorm:"column:QuestionTagID"` //多对1,话题/类别 View uint64 `gorm:"column:View"` // Follow uint64 `gorm:"column:Follow"` // Expiry time.Time `gorm:"column:Expiry"` //问题超时时间 Status string `gorm:"column:Status"` //问题状态 AnswerReward uint64 `gorm:"column:AnswerReward"` //回答奖励金额,分 Anonymous bool `gorm:"column:Anonymous"` //匿名提问 }
type QuestionTag ¶
func (QuestionTag) TableName ¶
func (QuestionTag) TableName() string
type Rank ¶
type Rank struct { BaseModel GrowMaxValue uint64 `gorm:"column:GrowMaxValue"` Title string `gorm:"column:Title"` }
等级
type RefundInfo ¶
type RefundInfo struct { ShipName string //退货快递公司 ShipNo string //退货快递编号 HasGoods bool //是否包含商品,true=包含商品,false=只有款 Reason string //原因 RefundPrice uint64 //返回金额 }
退货信息
type ScoreGoods ¶
type ScoreGoods struct { BaseModel OID uint64 `gorm:"column:OID"` Name string `gorm:"column:Name"` Score int `gorm:"column:Score"` Price uint64 `gorm:"column:Price"` Image string `gorm:"column:Image"` Introduce string `gorm:"column:Introduce"` }
积分兑换产品
func (*ScoreGoods) BeforeCreate ¶
func (u *ScoreGoods) BeforeCreate(scope *gorm.Scope) (err error)
func (ScoreGoods) TableName ¶
func (ScoreGoods) TableName() string
type ScoreJournal ¶
type ScoreJournal struct { BaseModel Name string `gorm:"column:Name;not null"` // Detail string `gorm:"column:Detail;not null"` // UserID uint64 `gorm:"column:UserID"` // Score int64 `gorm:"column:Score;default:'0'"` //变动金额 Type int `gorm:"column:Type;default:'0'"` // Balance uint64 `gorm:"column:Balance;default:'0'"` //变动后的余额 DataKV string `gorm:"column:DataKV;type:text"` //{Key:"",Value:""} }
Score明细
func (ScoreJournal) TableName ¶
func (ScoreJournal) TableName() string
type ShoppingCart ¶
type ShoppingCart struct { BaseModel UserID uint64 `gorm:"column:UserID"` GSID string `gorm:"column:GSID"` //GoodsID+""+SpecificationID Goods string `gorm:"column:Goods;type:text"` Specification string `gorm:"column:Specification;type:text"` Quantity uint `gorm:"column:Quantity"` //数量 }
购物车
func (ShoppingCart) TableName ¶
func (ShoppingCart) TableName() string
type Specification ¶
type Specification struct { BaseModel GoodsID uint64 `gorm:"column:GoodsID"` Label string `gorm:"column:Label"` Num uint64 `gorm:"column:Num"` //件 Weight uint64 `gorm:"column:Weight"` //每件 多少重 g Stock uint `gorm:"column:Stock"` CostPrice uint64 `gorm:"column:CostPrice"` //成本价 MarketPrice uint64 `gorm:"column:MarketPrice"` //市场价 Brokerage uint64 `gorm:"column:Brokerage"` //总佣金 }
商品规格
func (Specification) TableName ¶
func (Specification) TableName() string
type Store ¶
type Store struct { BaseModel OID uint64 `gorm:"column:OID"` Name string `gorm:"column:Name"` Address string `gorm:"column:Address"` Latitude float64 `gorm:"column:Latitude"` Longitude float64 `gorm:"column:Longitude"` Phone string `gorm:"column:Phone"` Amount uint64 `gorm:"column:Amount;default:'0'"` //现金 ServicePhone string `gorm:"column:ServicePhone"` OrderPhone string `gorm:"column:OrderPhone"` ContactName string `gorm:"column:ContactName"` Introduce string `gorm:"column:Introduce"` Images string `gorm:"column:Images;type:text"` Pictures string `gorm:"column:Pictures;type:text"` Stars uint64 `gorm:"column:Stars"` //总星星数量 StarsCount uint64 `gorm:"column:StarsCount"` //评分人数 }
门店
type StoreJournal ¶
type StoreJournal struct { BaseModel Name string `gorm:"column:Name;not null"` Detail string `gorm:"column:Detail;not null"` StoreID uint64 `gorm:"column:StoreID"` Type int `gorm:"column:Type;default:'0'"` //1=自主核销,2=在线充值 Amount int64 `gorm:"column:Amount;default:'0'"` //变动金额 Balance uint64 `gorm:"column:Balance;default:'0'"` //变动后的余额 TargetID uint64 `gorm:"column:TargetID"` }
账目明细
func (StoreJournal) TableName ¶
func (StoreJournal) TableName() string
type StoreStock ¶
type StoreStock struct { BaseModel StoreID uint64 `gorm:"column:StoreID"` GoodsID uint64 `gorm:"column:GoodsID"` SpecificationID uint64 `gorm:"column:SpecificationID"` Stock uint64 `gorm:"column:Stock"` UseStock uint64 `gorm:"column:UseStock"` //已经使用的量 }
门店库存
func (StoreStock) TableName ¶
func (u StoreStock) TableName() string
type SupplyOrders ¶
type SupplyOrders struct { BaseModel OID uint64 `gorm:"column:OID"` UserID uint64 `gorm:"column:UserID"` //用户ID,支付的用户ID OrderNo string `gorm:"column:OrderNo;unique"` //订单号 StoreID uint64 `gorm:"column:StoreID"` //目标ID,如果门店充值的话,这个就是门店的ID,如果普通用户充值的话,这个就是用户ID Type string `gorm:"column:Type"` //Store/User PayMoney uint64 `gorm:"column:PayMoney"` //支付金额 IsPay uint64 `gorm:"column:IsPay"` //是否支付成功,0=未支付,1,支付成功,2过期 PayTime time.Time `gorm:"column:PayTime"` //支付时间 }
充值
func (*SupplyOrders) BeforeCreate ¶
func (u *SupplyOrders) BeforeCreate(scope *gorm.Scope) (err error)
func (SupplyOrders) TableName ¶
func (SupplyOrders) TableName() string
type TimeSell ¶
type TimeSell struct { BaseModel OID uint64 `gorm:"column:OID"` Hash string `gorm:"column:Hash;unique"` //同一个Hash表示同一个活动 BuyNum int `gorm:"column:BuyNum"` Enable bool `gorm:"column:Enable"` DayNum int `gorm:"column:DayNum"` Discount int `gorm:"column:Discount"` TotalNum int `gorm:"column:TotalNum"` StartTime time.Time `gorm:"column:StartTime"` StartH int `gorm:"column:StartH"` StartM int `gorm:"column:StartM"` EndH int `gorm:"column:EndH"` EndM int `gorm:"column:EndM"` }
限时抢购
type TimeSellGoods ¶
type TimeSellGoods struct { BaseModel OID uint64 `gorm:"column:OID"` TimeSellHash string `gorm:"column:TimeSellHash"` GoodsID uint64 `gorm:"column:GoodsID"` Disable bool `gorm:"column:Disable"` //限时抢购中,单个商品是暂时 }
限时抢购商品
func (TimeSellGoods) TableName ¶
func (TimeSellGoods) TableName() string
type Transfers ¶
type Transfers struct { BaseModel OrderNo string `gorm:"column:OrderNo;unique"` //订单号 UserID uint64 `gorm:"column:UserID"` // StoreID uint64 `gorm:"column:StoreID"` Amount uint64 `gorm:"column:Amount;default:'0'"` //提现金额 ReUserName string `gorm:"column:ReUserName"` //提现用户真实的名字。 Desc string `gorm:"column:Desc"` //提现说明 IP string `gorm:"column:IP"` //IP OpenId string `gorm:"column:OpenId"` //OpenId IsPay uint64 `gorm:"column:IsPay"` //是否支付成功,0=未支付,1,支付成功,2过期 }
type User ¶
type User struct { BaseModel Name string `gorm:"column:Name"` // OpenID string `gorm:"column:OpenID"` // Tel string `gorm:"column:Tel;not null"` // Age int `gorm:"column:Age;default:'0'"` // Region string `gorm:"column:Region"` // Amount uint64 `gorm:"column:Amount;default:'0'"` //现金 BlockAmount uint64 `gorm:"column:BlockAmount;default:'0'"` //冻结现金 Score uint64 `gorm:"column:Score;default:'0'"` //积分 Growth uint64 `gorm:"column:Growth;default:'0'"` //成长值 Portrait string `gorm:"column:Portrait"` //头像 Gender int `gorm:"column:Gender;default:'0'"` //性别 1男 2女 Subscribe int `gorm:"column:Subscribe;default:'0'"` // LastLoginAt time.Time `gorm:"column:LastLoginAt"` // RankID uint64 `gorm:"column:RankID"` // SuperiorID uint64 `gorm:"column:SuperiorID"` // }
type UserFormIds ¶
type UserFormIds struct { BaseModel UserID uint64 `gorm:"column:UserID"` // FormId string `gorm:"column:FormId"` //formId 用于发送 }
func (UserFormIds) TableName ¶
func (UserFormIds) TableName() string
type UserInfo ¶
type UserJournal ¶
type UserJournal struct { BaseModel UserID uint64 `gorm:"column:UserID"` //受益者 Name string `gorm:"column:Name;not null"` // Detail string `gorm:"column:Detail;not null"` // Type int `gorm:"column:Type;default:'0'"` //ddddd Amount int64 `gorm:"column:Amount;default:'0'"` // Balance uint64 `gorm:"column:Balance;default:'0'"` // FromUserID uint64 `gorm:"column:FromUserID"` //来源 DataKV string `gorm:"column:DataKV;type:text"` //{Key:"",Value:""} }
账目明细
func (UserJournal) TableName ¶
func (UserJournal) TableName() string
type Verification ¶
type Verification struct { BaseModel VerificationNo string `gorm:"column:VerificationNo;unique"` //订单号 UserID uint64 `gorm:"column:UserID"` Name string `gorm:"column:Name"` Label string `gorm:"column:Label"` CardItemID uint64 `gorm:"column:CardItemID"` StoreID uint64 `gorm:"column:StoreID"` StoreUserID uint64 `gorm:"column:StoreUserID"` //门店核销管理员的用户ID Quantity uint `gorm:"column:Quantity"` //核销数量 }
核销记录-user,store
func (Verification) TableName ¶
func (Verification) TableName() string
type Voucher ¶
type Voucher struct { BaseModel OID uint64 `gorm:"column:OID"` Name string `gorm:"column:Name"` Amount uint64 `gorm:"column:Amount"` Image string `gorm:"column:Image"` UseDay int `gorm:"column:UseDay"` Introduce string `gorm:"column:Introduce"` }
优惠券
type WxConfig ¶
type WxConfig struct { BaseModel AppID string `gorm:"column:AppID"` AppSecret string `gorm:"column:AppSecret"` //Type string `gorm:"column:Type"` Token string `gorm:"column:Token"` EncodingAESKey string `gorm:"column:EncodingAESKey"` MchID string `gorm:"column:MchID"` PayKey string `gorm:"column:PayKey"` }