Documentation ¶
Index ¶
- func BuildQuery(conds Conds) (sql string, binds []interface{})
- type AccessToken
- type Address
- type AddressType
- type AdminUser
- type Attachment
- type Banner
- type Cart
- type Com
- type ComBodyJson
- type ComCate
- type ComCidsJson
- type ComGalleryJson
- type ComImage
- type ComImageSpecImagesJson
- type ComRelateCate
- type ComSku
- type ComSkuSpecJson
- type ComSkuSpecOneInfo
- type ComSpec
- type ComSpecListJson
- type ComSpecOneInfo
- type ComSpecValue
- type ComStore
- type Comment
- type Cond
- type Conds
- type CreateSpecValue
- type Doc
- type FeedImagesJson
- type Freight
- type FreightAreas
- type FreightAreasJson
- type Image
- type OneComBody
- type Order
- type OrderExtend
- type OrderExtendInvoiceInfoJson
- type OrderExtendReceiverInfoJson
- type OrderGoods
- type OrderLog
- type OrderPay
- type PointLimit
- type PointLog
- type Signin
- type SigninLog
- type StringsJson
- type Ups
- type User
- type UserGoods
- type UserOpen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildQuery ¶
BuildQuery 根据conds构建sql和绑定的参数
Types ¶
type AccessToken ¶
type AccessToken struct { Jti int `gorm:"not null" json:"jti" form:"jti" gorm:"primary_key"` Sub int `gorm:"not null" json:"sub" form:"sub"` IaTime int64 `gorm:"not null" json:"ia_time" form:"ia_time"` ExpTime int64 `gorm:"not null;comment:'过期时间'" json:"exp_time" form:"exp_time"` Ip string `gorm:"not null" json:"ip" form:"ip"` CreateTime int64 `gorm:"not null" json:"create_time" form:"create_time"` IsLogout int `gorm:"not null;comment:'是否主动退出'" json:"is_logout" form:"is_logout"` IsInvalid int `` /* 127-byte string literal not displayed */ LogoutTime int64 `gorm:"not null" json:"logout_time" form:"logout_time"` }
func (*AccessToken) TableName ¶
func (*AccessToken) TableName() string
type Address ¶
type Address struct { Id int `gorm:"not null;primary_key;comment:'主键ID'"json:"id"` CreatedAt time.Time `gorm:"comment:'注释'"json:"createdAt"` UpdatedAt time.Time `gorm:"comment:'注释'"json:"updatedAt"` DeletedAt *time.Time `gorm:"comment:'注释'"json:"deletedAt"` CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updatedBy"` Name string `gorm:"not null;comment:'注释'"json:"name"` ProvinceId int `gorm:"not null;comment:'注释'"json:"provinceId"` CityId int `gorm:"not null;comment:'注释'"json:"cityId"` AreaId int `gorm:"not null;comment:'注释'"json:"areaId"` Region string `gorm:"not null;"json:"region"` Detail string `gorm:"not null;comment:'注释'"json:"detail"` TelPhone string `gorm:"not null;comment:'注释'"json:"telPhone"` Mobile string `gorm:"not null;comment:'注释'"json:"mobile"` ZipCode string `gorm:"not null;comment:'注释'"json:"zipCode"` IsDefault int `gorm:"not null;comment:'注释'"json:"isDefault"` TypeId int `gorm:"not null;comment:'注释'"json:"typeId"` // 类型 1为家,2为公司,3为学校,4为其他 StreetId int `gorm:"not null;comment:'注释'"json:"streetId"` TypeName string `gorm:"not null;"json:"typeName"` }
func (*Address) WithTypeName ¶
type AddressType ¶
type AddressType struct { Id int `gorm:"not null;primary_key;comment:'主键ID'"json:"id"` CreatedAt time.Time `gorm:"comment:'注释'"json:"createdAt"` UpdatedAt time.Time `gorm:"comment:'注释'"json:"updatedAt"` DeletedAt *time.Time `gorm:"comment:'注释'"json:"deletedAt"` CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updatedBy"` Name string `gorm:"not null;comment:'注释'"json:"name"` }
func (*AddressType) TableName ¶
func (*AddressType) TableName() string
type AdminUser ¶
type AdminUser struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `json:"created_at" form:"created_at" ` // 创建时间 UpdatedAt time.Time `json:"updated_at" form:"updated_at" ` // 更新时间 DeletedAt *time.Time `json:"deleted_at" form:"deleted_at" gorm:"index"` // 删除时间 Name string `gorm:"not null;type:varchar(100);comment:'姓名'"` Address string `gorm:"not null;type:varchar(100);comment:'地址'"` Password string `gorm:"not null;type:varchar(255);comment:'密码'"` Nickname string `gorm:"not null;"json:"nickname" form:"nickname" ` // Email string `gorm:"not null;"json:"email" form:"email" ` // Phone string `gorm:"not null;"json:"phone" form:"phone" ` // Avatar string `gorm:"not null;"json:"avatar" form:"avatar" ` // Role int `gorm:"not null;comment:'0 默认,1 普通会员,2 vip会员,3 高级专家'"json:"role" form:"role"` // Status int `gorm:"not null;"json:"status" form:"status" ` // LastLoginTime time.Time `json:"last_login_time" form:"last_login_time" ` // LastLoginIP string `gorm:"not null;type:varchar(30);comment:'最后一次登陆IP'"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
type Attachment ¶
type Attachment struct { Id int `gorm:"not null;primary_key;comment:'注释'"` CreatedAt time.Time `gorm:"comment:'注释'"json:"createdAt"` UpdatedAt time.Time `gorm:"comment:'注释'"json:"updatedAt"` DeletedAt *time.Time `gorm:"index;comment:'注释'"json:"deletedAt"` GoodsId int `gorm:"not null;comment:'注释'"json:"goodsId"` GoodsType int `gorm:"not null;comment:'注释'"json:"goodsType"` FileName string `gorm:"not null;comment:'注释'"json:"fileName"` FilePath string `gorm:"not null;comment:'注释'"json:"filePath"` FileSize float64 `gorm:"not null;comment:'注释'"json:"fileSize"` HttpPath string `gorm:"not null;comment:'注释'"json:"httpPath"` FileExt string `gorm:"not null;comment:'注释'"json:"fileExt"` CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
func (*Attachment) TableName ¶
func (*Attachment) TableName() string
type Banner ¶
type Banner struct { Id int `gorm:"not null;primary_key;comment:'主键ID'"json:"id"` CreatedAt time.Time `gorm:"comment:'注释'"json:"createdAt"` UpdatedAt time.Time `gorm:"comment:'注释'"json:"updatedAt"` DeletedAt *time.Time `gorm:"comment:'注释'"json:"deletedAt"` CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updatedBy"` ResType int `gorm:"not null;"json:"resType"` // 资源类型 Title string `gorm:"not null;"json:"title"` // 名称 Link string `gorm:"not null;"json:"link"` // 链接 Image string `gorm:"not null;"json:"image"` // 图片地址 Content string `gorm:"not null;"json:"content"` // 内容 Enable int `gorm:"not null;"json:"enable"` // 是否显示 StartTime int64 `gorm:"not null;"json:"startTime"` // 开始时间 EndTime int64 `gorm:"not null;"json:"endTime"` // 结束时间 PartId int `gorm:"not null"json:"partid"` //部门分类 }
type Cart ¶
type Cart struct { Id int `gorm:"not null;primary_key;comment:'注释'"json:"id"` CreatedAt time.Time `gorm:"comment:'注释'"json:"createdAt"` UpdatedAt time.Time `gorm:"comment:'注释'"json:"updatedAt"` DeletedAt *time.Time `gorm:"index;comment:'注释'"json:"deletedAt"` CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updatedBy"` IsCheck int `gorm:"not null;"json:"isCheck"` // 选中状态 默认1选中 0未选中 Num int `gorm:"not null;"json:"num"` // 商品个数 TypeId int `gorm:"not null;"json:"typeId"` // 类型,1为feed,2为com FeedId int `gorm:"not null;"json:"feedId"` ComSkuId int `gorm:"not null;"json:"comSkuId"` // 赋值处理的 Title string `gorm:"-"json:"title"` SubTitle string `gorm:"-"json:"subTitle"` Status int `gorm:"-"json:"status"` // 1生效,2失效 Cover string `gorm:"-"json:"cover"` // goods sku img Price float64 `gorm:"-"json:"price"` // goods sku price PriceType int `gorm:"-"json:"priceType"` // goods sku price PayType int `gorm:"-"json:"payType"` // goods pay type Stock int `gorm:"-"json:"stock"` // goods sku stock ComId int `gorm:"-"json:"comId"` ComIsOnSale int `gorm:"-"json:"comIsOnSale"` ComFreightFee float64 `gorm:"-"json:"comFreightFee"` ComFreightId int `gorm:"-"json:"comFreightId"` // goods freight id ComSpec ComSkuSpecJson `gorm:"-"json:"comSpec"` // goods sku spec ComWeight float64 `gorm:"-"json:"comWeight"` // goods sku weight ComFreightAreas FreightAreasJson `gorm:"-"json:"comFreightAreas"` // freight areas PartId int `gorm:"not null"json:"partid"` //部门分类 }
func (*Cart) FreightFeeByAddress ¶
计算运输费用
func (Cart) GetFreightWay ¶
type Com ¶
type Com struct { Id int `gorm:"not null;comment:'主键id'"json:"id"` CreatedAt time.Time `gorm:"comment:'创建时间'"json:"createdAt"` UpdatedAt time.Time `gorm:"comment:'更新时间'"json:"updatedAt"` // 更新时间 DeletedAt *time.Time `gorm:"comment:'注释';index"json:"deletedAt"` CntView int `gorm:"not null;comment:'注释'"json:"cntView"` CntStar int `gorm:"not null;comment:'注释'"json:"cntStar"` CntCollect int `gorm:"not null;comment:'注释'"json:"cntCollect"` CntComment int `gorm:"not null;comment:'注释'"json:"cntComment"` CntIsPay int `gorm:"not null;"json:"cntIsPay"` // 为了兼容usergoods CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updatedBy"` Title string `gorm:"not null;"json:"title"` SubTitle string `gorm:"not null;"json:"subTitle"` Cover string `gorm:"not null;comment:'注释'"json:"cover"` Gallery ComGalleryJson `gorm:"not null;type:json;comment:'注释'"json:"gallery"` Stock int `gorm:"not null;comment:'注释'"json:"stock"` // goods表库存之和 SaleNum int `gorm:"not null;comment:'注释'"json:"saleNum"` GroupSaleNum int `gorm:"not null;comment:'注释'"json:"groupSaleNum"` SaleTime time.Time `gorm:"comment:'注释'"json:"saleTime"` PayType int `gorm:"not null;comment:'注释'"json:"payType"` FreightFee float64 `gorm:"not null;comment:'注释'"json:"freightFee"` FreightId int `gorm:"not null;comment:'注释'"json:"freightId"` BaseSaleNum int `gorm:"not null;comment:'注释'"json:"baseSaleNum"` IsOnSale int `gorm:"not null;comment:'注释'"json:"isOnSale"` ImageSpecId int `gorm:"not null;comment:'注释'"json:"imageSpecId"` OriginPrice float64 `gorm:"not null;"json:"originPrice"` // 原价 Price float64 `gorm:"not null;comment:'注释'"json:"price"` PreMarkdown string `gorm:"-"json:"preMarkdown"` PreHtml string `gorm:"-"json:"preHtml"` Markdown string `gorm:"-"json:"markdown"` Html string `gorm:"-"json:"html"` WechatHtml string `gorm:"-"json:"wechatHtml"` SkuList []ComSku `gorm:"-"json:"skuList"` // 库存列表信息,冗余字段 SpecList ComSpecListJson `gorm:"not null;type:json"json:"specList"` // 规格参数 Cids ComCidsJson `gorm:"not null;type:json"json:"cids"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
type ComBodyJson ¶
type ComBodyJson []OneComBody
func (*ComBodyJson) Scan ¶
func (c *ComBodyJson) Scan(input interface{}) error
type ComCate ¶
type ComCate struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `json:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt"` // 更新时间 DeletedAt *time.Time `json:"deletedAt"gorm:"index"` // 删除时间 CreatedBy int `gorm:"not null;"json:"createdBy"` // 创建者 UpdatedBy int `gorm:"not null;"json:"updatedBy"` // 更新者 Name string `gorm:"not null"json:"name"` Sequence int `gorm:"not null"json:"sequence"` Pid int `gorm:"not null"json:"pid"` Icon string `gorm:"not null"json:"icon" form:"icon" ` // Sort int `gorm:"not null"json:"sort" form:"sort" ` // Status int `gorm:"not null"json:"status"` Remark string `gorm:"not null"json:"remark"` PartId int `gorm:"not null"json:"partid"` //部门分类 TypeId int `gorm:"not null"json:"typeid"` //分类用途 UrlName string `gorm:"not null"json:"urlname"` //url前缀 Tags string `gorm:"not null"json:"tags"` //tags标签 IdPath string `gorm:"not null"json:"idpath"` //id路径 LocalUrl string `gorm:"not null"json:"localurl"` //跳转路径 }
type ComCidsJson ¶
type ComCidsJson []int
func (*ComCidsJson) Scan ¶
func (c *ComCidsJson) Scan(input interface{}) error
type ComGalleryJson ¶
type ComGalleryJson []string
func (*ComGalleryJson) Scan ¶
func (c *ComGalleryJson) Scan(input interface{}) error
type ComImage ¶
type ComImage struct { Id int `gorm:"not null;"json:"id"` // ComId int `gorm:"not null;"json:"comId"` // 商品公共内容id ColorId int `gorm:"not null;"json:"colorId"` // 颜色规格值id Img string `gorm:"not null;"json:"img"` // 商品图片 Sort int `gorm:"not null;"json:"sort"` // 排序 IsDefault int `gorm:"not null;"json:"isDefault"` // 默认主题,1是,0否 DeletedAt *time.Time `gorm:"index"json:"deletedAt"` CreatedAt time.Time `gorm:""json:"createdAt"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
type ComImageSpecImagesJson ¶
type ComImageSpecImagesJson StringsJson
func (*ComImageSpecImagesJson) Scan ¶
func (c *ComImageSpecImagesJson) Scan(input interface{}) error
type ComRelateCate ¶
type ComRelateCate struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `json:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt"` // 更新时间 DeletedAt *time.Time `json:"deletedAt"gorm:"index"` // 删除时间 ComId int `gorm:"not null;"json:"comId"` // Cid int `gorm:"not null;"json:"cid"` }
func (*ComRelateCate) TableName ¶
func (*ComRelateCate) TableName() string
type ComSku ¶
type ComSku struct { Id int `gorm:"not null;comment:'主键id'"json:"id"` CreatedAt time.Time `gorm:"comment:'创建时间'"json:"createdAt"` UpdatedAt time.Time `gorm:"comment:'更新时间'"json:"updatedAt"` // 更新时间 DeletedAt *time.Time `gorm:"comment:'注释';index"json:"deletedAt"` CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updatedBy"` ComId int `gorm:"not null;"json:"comId"` // 商品公共表id Spec ComSkuSpecJson `gorm:"not null;type:json"json:"spec"` // 规格json信息 Price float64 `gorm:"not null;"json:"price"` // 商品价格 Stock int `gorm:"not null;"json:"stock"` // 商品库存 Code string `gorm:"not null;"json:"code"` // 商品编码 Cover string `gorm:"not null;"json:"cover"` // 商品主图 Weight float64 `gorm:"not null;"json:"weight"` // 商品重量 Title string `gorm:"not null;"json:"title"` // 商品名称(+规格名称) SaleNum int `gorm:"not null;"json:"saleNum"` // 销售数量 GroupSaleNum int `gorm:"not null;"json:"groupSaleNum"` // 拼团销量 PartId int `gorm:"not null"json:"partid"` //部门分类 }
type ComSkuSpecJson ¶
type ComSkuSpecJson []ComSkuSpecOneInfo
func (*ComSkuSpecJson) Scan ¶
func (c *ComSkuSpecJson) Scan(input interface{}) error
type ComSkuSpecOneInfo ¶
type ComSpec ¶
type ComSpec struct { Id int `gorm:"not null;primary_key"json:"id"` // 规格id Name string `gorm:"not null;"json:"name"` // 规格名称 Sort int `gorm:"not null;"json:"sort"` // 规格排序 CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `gorm:"index"json:"deletedAt"` // 软删除时间 PartId int `gorm:"not null"json:"partid"` //部门分类 }
type ComSpecListJson ¶
type ComSpecListJson []ComSpecOneInfo
func (*ComSpecListJson) Scan ¶
func (c *ComSpecListJson) Scan(input interface{}) error
type ComSpecOneInfo ¶
type ComSpecOneInfo struct { Id int `json:"id"` Name string `json:"name"` ValueList []CreateSpecValue `json:"valueList"` }
type ComSpecValue ¶
type ComSpecValue struct { Id int `gorm:"not null;primary_key"json:"id"` // 规格值id SpecId int `gorm:"not null;index"json:"specId"` // 规格id Name string `gorm:"not null;"json:"name"` // 规格值名称 Sort int `gorm:"not null;"json:"sort"` // 排序 Color string `gorm:"not null;"json:"color"` // 色彩值 Img string `gorm:"not null;"json:"img"` // 图片 DeletedAt *time.Time `gorm:"index"json:"deletedAt"` // 软删除时间 }
func (*ComSpecValue) TableName ¶
func (*ComSpecValue) TableName() string
type ComStore ¶
type ComStore struct { CreatedAt time.Time `json:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt"` // 更新时间 ComId int `gorm:"not null;comment:'注释'"json:"comId"` PreMarkdown string `gorm:"not null;type:text;comment:'注释'"json:"preMarkdown"` PreHtml string `gorm:"not null;type:text;comment:'注释'"json:"preHtml"` Markdown string `gorm:"not null;type:text;comment:'注释'"json:"markdown"` Html string `gorm:"not null;type:text;comment:'注释'"json:"webHtml"` WechatHtml string `gorm:"not null;type:text;comment:'注释'"json:"wechatHtml"` CreatedBy int `gorm:"not null;comment:'注释'"json:"createdBy"` UpdatedBy int `gorm:"not null;comment:'注释'"json:"updatedBy"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
type Comment ¶
type Comment struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `json:"createdAt" ` // 创建时间 UpdatedAt time.Time `json:"updatedAt"` // 更新时间 DeletedAt *time.Time `json:"deletedAt"gorm:"index"` // 删除时间 GoodsId int `gorm:"not null"json:"goodsId"` // 商品id TypeId int `gorm:"not null"json:"typeId"` // 类型id Content string `gorm:"not null;type:text"json:"content"` // 评论内容 Uid int `gorm:"not null"json:"uid"` // 用户id Score int `gorm:"not null"json:"score"` // 评分,存储为int,前端做小数转换 Nickname string `gorm:"not null"json:"nickname"` // Avatar string `gorm:"not null;"json:"avatar" ` // PartId int `gorm:"not null"json:"partid"` //部门分类 }
type Cond ¶
type Cond struct { // Op MySQL中查询条件,如like,=,in Op string // Val 查询条件对应的值 Val interface{} }
Cond 为字段查询结构体
type Conds ¶
type Conds map[string]interface{}
Conds 为Cond类型map,用于定义Where方法参数 map[field.name]interface{}
type CreateSpecValue ¶
type Doc ¶
type Doc struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `json:"created_at" form:"created_at" ` // 创建时间 UpdatedAt time.Time `json:"updated_at" form:"updated_at" ` // 更新时间 DeletedAt *time.Time `json:"deleted_at" form:"deleted_at" gorm:"index"` // 删除时间 CntView int `json:"cnt_view" form:"cnt_view" ` // 阅读量 CntStar int `json:"cnt_star" form:"cnt_star" ` // 点赞量 CntComment int `json:"cnt_comment" form:"cnt_comment" ` // 评论量 CreatedBy int `json:"created_by" form:"created_by" ` // 创建者 UpdatedBy int `json:"updated_by" form:"updated_by" ` // 更新者 Name string `json:"name" form:"name" ` // 名称 Desc string `json:"desc" form:"desc" ` // 描述 Cover string `json:"cover" form:"cover" ` // 封面 CommentStatus string `json:"comment_status" form:"comment_status" ` // Nickname string `json:"nickname" form:"nickname" ` // 昵称,冗余字段 Avatar string `json:"avatar" form:"avatar" ` // 头像,冗余字段 Content string `json:"content" form:"content" ` // 资料完整内容,要么是Img数组,要么是长度为1的Pdf、Doc数组 Hot int `json:"hot" form:"hot" ` // 热度 Score int `json:"score" form:"score" ` // 评分 CntPay int `json:"cnt_pay" form:"cnt_pay" ` // 付款量 FreeType int `json:"free_type" form:"free_type" ` // 免费类型[0为初始值不应该存在的值 1为完全免费 2为分享免费 3只能积分购买,4只能现金购买,5现金,积分都可以购买] FreePage int `json:"free_page" form:"free_page" ` // 前多少页免费看,后多少页则需分享或付费 NeedPoint int `json:"need_point" form:"need_point" ` // 所需要积分 NeedAmount int `json:"need_amount" form:"need_amount" ` // 所需要金额,单位为分 DownloadUrl string `json:"download_url" form:"download_url" ` // 下载url Status int `json:"status" form:"status" ` // 状态[0为审核中 1为审核成功 2位审核失败] Cid1 int `json:"cid1" form:"cid1" ` // 1级栏目id Cid2 int `json:"cid2" form:"cid2" ` // 2级栏目id CateId int `json:"cate_id" form:"cate_id" ` // 分类id[1纯文档 2试卷 3习题答案 4学霸笔记 5PPT 6视频 7实体] MainResType int `json:"main_res_type" form:"main_res_type" ` // 主体资源类型[1pdf 2img 3ppt 4word 5txt 6markdown 7excel] Document string `json:"document" form:"document" ` // PartId int `gorm:"not null"json:"partid"` //部门分类 }
type FeedImagesJson ¶
type FeedImagesJson []string
type Freight ¶
type Freight struct { Id int `json:"id" form:"id" gorm:"not null;primary_key"` // 主键ID CreatedAt time.Time `gorm:""json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:""json:"updatedAt"` // 更新时间 DeletedAt *time.Time `gorm:"index"json:"deletedAt"` // 删除时间 Areas FreightAreasJson `gorm:"not null;type:json"json:"areas"` Name string `gorm:"not null;"json:"name"` PayType int `gorm:"not null;"json:"payType"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
type FreightAreas ¶
type FreightAreasJson ¶
type FreightAreasJson []FreightAreas
func (*FreightAreasJson) Scan ¶
func (c *FreightAreasJson) Scan(input interface{}) error
type Image ¶
type Image struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `json:"createdAt" ` // 创建时间 UpdatedAt time.Time `json:"updatedat" ` // 更新时间 DeletedAt *time.Time `json:"deletedAt"` // 删除时间 CreatedBy int `gorm:"not null;"json:"createdBy"` // 创建者 UpdatedBy int `gorm:"not null;"json:"updatedBy"` // 更新者 TypeId int `gorm:"not null;"json:"typeId"` Name string `gorm:"not null;"json:"name" form:"name" ` // Size float64 `gorm:"not null;"json:"size" form:"size" ` // Type string `gorm:"not null;"json:"type" form:"type" ` // Url string `gorm:"not null;"json:"url" form:"url" ` // PartId int `gorm:"not null"json:"partid"` //部门分类 }
图片
type OneComBody ¶
type Order ¶
type Order struct { Id int `gorm:"not null;primary_key"json:"id"` // 主键id CreatedAt time.Time `gorm:""json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:""json:"updatedAt"` // 更新时间 DeletedAt *time.Time `gorm:"index"json:"deletedAt"` // 删除时间 OrderType int `gorm:"not null;"json:"orderType"` // 1 为猫咪,2为商品 Sn string `gorm:"not null;"json:"sn"` // 订单编号 PaySn string `gorm:"not null;"json:"paySn"` // 支付单号 Uid int `gorm:"not null;"json:"uid"` // 买家id UserName string `gorm:"not null;"json:"userName"` // 买家姓名 UserPhone string `gorm:"not null;"json:"userPhone"` // 买家手机号码 UserEmail string `gorm:"not null;"json:"userEmail"` // 买家电子邮箱 CreatedBy int `gorm:"not null;"json:"createdBy"` UpdatedBy int `gorm:"not null;"json:"updatedBy"` From int `gorm:"not null;"json:"from"` // 1WEB2mobile Remark string `gorm:"not null;"json:"remark"` // 订单备注 Amount float64 `gorm:"not null;"json:"amount"` // 订单总价格 GoodsAmount float64 `gorm:"not null;"json:"goodsAmount"` PdAmount float64 `gorm:"not null;"json:"pdAmount"` // 预存款支付金额 FreightFee float64 `gorm:"not null;"json:"freightFee"` // 实际支付的运费 FreightUnifiedFee float64 `gorm:"not null;"json:"freightUnifiedFee"` // 运费统一运费 FreightTemplateFee float64 `gorm:"not null;"json:"freightTemplateFee"` // 运费模板运费 GoodsNum int `gorm:"not null;"json:"goodsNum"` // 商品个数 ReviseAmount float64 `gorm:"not null;"json:"reviseAmount"` // 修改过的订单总价格 大于0起作用 ReviseFreightFee float64 `gorm:"not null;"json:"reviseFreightFee"` // 修改过的实际支付的运费 PaymentCode string `gorm:"not null;"json:"paymentCode"` // 支付方式名称代码 PayName string `gorm:"not null;"json:"payName"` // 支付方式 PaymentTime int64 `gorm:"not null;"json:"paymentTime"` // 支付成功的(付款的)时间 FinishedTime int64 `gorm:"not null;"json:"finishedTime"` // 订单完成时间 State int `gorm:"not null;"json:"state"` // 订单状态[0已取消 10默认未付款 20已付款 30已发货 40已收货] RefundAmount float64 `gorm:"not null;"json:"refundAmount"` // 退款金额 RefundState int `gorm:"not null;"json:"refundState"` // 退款状态[0无退款 1部分退款 2全部退款] LockState int `gorm:"not null;"json:"lockState"` // 锁定状态[0正常 大于0锁定 默认是0] TradeNo string `gorm:"not null;"json:"tradeNo"` // 支付宝交易号OR微信交易号 EvaluateState int `gorm:"not null;"json:"evaluateState"` // 评价状态 0未评价,1已评价 PayableTime int64 `gorm:"not null;"json:"payableTime"` // 订单可支付时间 下单时间+24小时 时间戳 OutRequestNo string `gorm:"not null;"json:"outRequestNo"` // 支付宝标识一次退款请求,同一笔交易多次退款需要保证唯一,如需部分退款,则此参数必传。 PartId int `gorm:"not null"json:"partid"` //部门分类 }
func (Order) GetOrderPaymentName ¶
func (Order) GetOrderState ¶
type OrderExtend ¶
type OrderExtend struct { Id int `gorm:"not null;primary_key"json:"id"` // 订单索引id TrackingTime int64 `gorm:"not null;"json:"trackingTime"` // 配送时间 TrackingNo string `gorm:"not null;"json:"trackingNo"` // 物流单号 ShipperId int `gorm:"not null;"json:"shipperId"` // 商家物流地址id ExpressId int `gorm:"not null;"json:"expressId"` // 物流公司id,默认为0 代表不需要物流 Message string `gorm:"not null;"json:"message"` // 买家留言 VoucherPrice int `gorm:"not null;"json:"voucherPrice"` // 代金券面额 VoucherId int `gorm:"not null;"json:"voucherId"` // 代金券id VoucherCode string `gorm:"not null;"json:"voucherCode"` // 代金券编码 Remark string `gorm:"not null;"json:"remark"` // 发货备注 ReceiverName string `gorm:"not null;"json:"receiverName"` // 收货人姓名 ReceiverPhone string `gorm:"not null;"json:"receiverPhone"` // 收货人电话 ReceiverInfo OrderExtendReceiverInfoJson `gorm:"not null;type:json"json:"receiverInfo"` // 收货人其它信息 json ReceiverProvinceId int `gorm:"not null;"json:"receiverProvinceId"` ReceiverCityId int `gorm:"not null;"json:"receiverCityId"` ReceiverAreaId int `gorm:"not null;"json:"receiverAreaId"` InvoiceInfo OrderExtendInvoiceInfoJson `gorm:"not null;type:json"json:"invoiceInfo"` // 发票信息 json PromotionInfo string `gorm:"not null;"json:"promotionInfo"` // 促销信息备注 EvaluateTime int64 `gorm:"not null;"json:"evaluateTime"` // 评价时间 ServiceRemarks string `gorm:"not null;"json:"serviceRemarks"` // 后台客服对此订单做出的备注 DeletedAt *time.Time `gorm:"index"json:"deleteTime"` // 软删除时间 DeliverName string `gorm:"not null;"json:"deliverName"` // 配送人名字 DeliverPhone string `gorm:"not null;"json:"deliverPhone"` // 配送人电话 DeliverAddress string `gorm:"not null;"json:"deliverAddress"` // 配送地址 FreightRule int `gorm:"not null;"json:"freightRule"` // 运费规则1按商品累加运费2组合运费 NeedExpress int `gorm:"not null;"json:"needExpress"` // 是否需要物流1需要0不需要 IsRefund int `gorm:"-"json:"isRefund"` RefundStatus int `gorm:"-"json:"refundStatus"` }
func (*OrderExtend) TableName ¶
func (*OrderExtend) TableName() string
type OrderExtendInvoiceInfoJson ¶
type OrderExtendInvoiceInfoJson []string
func (*OrderExtendInvoiceInfoJson) Scan ¶
func (c *OrderExtendInvoiceInfoJson) Scan(input interface{}) error
type OrderExtendReceiverInfoJson ¶
type OrderExtendReceiverInfoJson struct { Name string `json:"name"` Detail string `json:"detail"` Phone string `json:"phone"` Type string `json:"type"` Address string `json:"address"` }
func (*OrderExtendReceiverInfoJson) Scan ¶
func (c *OrderExtendReceiverInfoJson) Scan(input interface{}) error
type OrderGoods ¶
type OrderGoods struct { Id int `gorm:"not null;primary_key"json:"id"` // 主键ID CreatedAt time.Time `gorm:""json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:""json:"updatedAt"` // 更新时间 DeletedAt *time.Time `gorm:"index"json:"deletedAt"` // 删除时间 Uid int `gorm:"not null;"json:"uid"` // 买家ID OrderId int `gorm:"not null;"json:"orderId"` // 订单ID TypeId int `gorm:"not null;"json:"typeId"` FeedId int `gorm:"not null;"json:"feedId"` Title string `gorm:"not null;"json:"title"` // 商品名称 Price float64 `gorm:"not null;"json:"price"` // 商品价格 just价格 PriceType int `gorm:"not null;"json:"priceType"` // 1 为总款,2 为预付款 PayPrice float64 `gorm:"not null;"json:"payPrice"` // 商品实际支付价格(拼团商品适用) Cover string `gorm:"not null;"json:"cover"` // 商品图片 Num int `gorm:"not null;"json:"num"` // 商品数量 ComId int `gorm:"not null;"json:"comId"` // 商品主表ID ComSkuId int `gorm:"not null;"json:"comSkuId"` // 商品ID ComType int `gorm:"not null;"json:"comType"` // 类型[1默认 2团购商品 3限时折扣商品 4组合套装 5赠品] ComFreightWay string `gorm:"not null;"json:"comFreightWay"` // 商品运费方式 ComFreightFee float64 `gorm:"not null;"json:"comFreightFee"` // 商品的运费 EvaluateState int `gorm:"not null;"json:"evaluateState"` // 评价状态[0未评价 1已评价 2已追评] EvaluateTime int64 `gorm:"not null;"json:"evaluateTime"` // 评价时间 CouponId int `gorm:"not null;"json:"couponId"` // 线上卡券,大于0线上卡券,微信卡券表表ID,一个规格的商品对应一张微信卡券 CouponCardId string `gorm:"not null;"json:"couponCardId"` // 线上卡券,微信卡券表微信卡券ID LockState int `gorm:"not null;"json:"lockState"` // 锁定状态[1退款中] RefundHandleState int `gorm:"not null;"json:"refundHandleState"` // 退款平台处理状态[默认0处理中(未处理) 10拒绝(驳回) 20同意 30成功(已完成) 50取消(用户主动撤销) 51取消(用户主动收货)] RefundId int `gorm:"not null;"json:"refundId"` // 退款ID GroupPrice float64 `gorm:"not null;"json:"groupPrice"` // 拼团价格 just价格 CaptainPrice float64 `gorm:"not null;"json:"captainPrice"` // 团长价格 just价格 ComRevisePrice float64 `gorm:"not null;"json:"comRevisePrice"` // 修改过的商品实际支付费用 大于0起作用 RefundState int `gorm:"-"json:"refundState"` // 退款状态 IsRefund int `gorm:"-"json:"isRefund"` // 是否退款 PartId int `gorm:"not null"json:"partid"` //部门分类 }
func (*OrderGoods) TableName ¶
func (*OrderGoods) TableName() string
type OrderLog ¶
type OrderLog struct { Id int `gorm:"not null;primary_key"json:"id"` CreatedAt time.Time `gorm:""json:"createdAt"` UpdatedAt time.Time `gorm:""json:"updatedAt"` DeletedAt *time.Time `gorm:""json:"deletedAt"` OrderId int `gorm:"not null;"json:"orderId"` // 订单ID Msg string `gorm:"not null;"json:"msg"` // 文字描述 Role string `gorm:"not null;"json:"role"` // 操作角色 UpdatedBy int `gorm:"not null;"json:"updatedBy"` // 操作人 OrderState int `gorm:"not null;"json:"orderState"` // 订单状态[0已取消 10默认未付款 20已付款 30已发货 40已收货] PartId int `gorm:"not null"json:"partid"` //部门分类 }
type OrderPay ¶
type OrderPay struct { Id int `gorm:"not null;primary_key"json:"id"` // 主键ID CreatedAt time.Time `gorm:""json:"createdAt"` UpdatedAt time.Time `gorm:""json:"updatedAt"` DeletedAt *time.Time `gorm:"index"json:"deletedAt"` PaySn string `gorm:"not null;"json:"paySn"` Uid int `gorm:"not null;"json:"uid"` PayState int `gorm:"not null;"json:"payState"` // 支付状态[0默认未支付 1已支付 只有第三方支付接口通知到时才会更改此状态] PartId int `gorm:"not null"json:"partid"` //部门分类 }
type PointLimit ¶
type PointLimit struct { Id int `gorm:"primary_key;not null;comment:'主键ID'"` CreatedAt time.Time `gorm:"comment:'创建时间'"` UpdatedAt time.Time `gorm:"comment:'更新时间'"` Uid int `gorm:"not null"` Limit1 int `gorm:"not null;comment:'目前有多少积分'"` Limit1UpdatedAt time.Time `` PartId int `gorm:"not null"json:"partid"` //部门分类 }
积分限制
func (*PointLimit) TableName ¶
func (*PointLimit) TableName() string
type PointLog ¶
type Signin ¶
type SigninLog ¶
type StringsJson ¶
type StringsJson []string
type User ¶
type User struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `gorm:""json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:""json:"updatedAt"` // 更新时间 DeletedAt *time.Time `gorm:"index"json:"deletedAt"` // 删除时间 Name string `gorm:"not null;"json:"name"` // 姓名 OpenId int `gorm:"not null;"json:"openId"` // 开放平台id OpenType int `gorm:"not null;"json:"openType"` // 开放平台类型,微信、支付宝等 Address string `gorm:"not null;"json:"address"` // 地址 Password string `gorm:"not null;"json:"password"` // 密码 Point int `gorm:"not null;"json:"point"` // 积分 Quota int `gorm:"not null;"json:"quota"` // 免费下载资料的配额 Balance int `gorm:"not null;"json:"balance"` // 账户余额 Level int `gorm:"not null;"json:"level"` // 等级 Account string `gorm:"not null;"json:"account"` AuthMethod string `gorm:"not null;"json:"authMethod"` Nickname string `gorm:"not null;"json:"nickname"` Desc string `gorm:"not null;"json:"desc"` Email string `gorm:"not null;"json:"email"` Phone string `gorm:"not null;"json:"phone"` Avatar string `gorm:"not null;"json:"avatar"` Role int `gorm:"not null;"json:"role"` Status int `gorm:"not null;"json:"status"` LastLoginTime time.Time `gorm:""json:"lastLoginTime"` LastLoginIP string `gorm:"not null;"json:"lastLoginIp"` // 最后一次登陆IP Wxpay string `gorm:"not null;"json:"wxpay"` // Alipay string `gorm:"not null;"json:"alipay"` // RoleName string `gorm:"-"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
func (*User) IsAdministrator ¶
type UserGoods ¶
type UserGoods struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `json:"createdAt"` // 创建时间 UpdatedAt time.Time `json:"updatedAt"` // 更新时间 DeletedAt *time.Time `json:"deletedAt"gorm:"index"` // 删除时间 Uid int `gorm:"not null;index"json:"uid"` // 用户ID GoodsId int `gorm:"not null;index"json:"goodsId"` // 商品ID TypeId int `gorm:"not null;index"json:"typeId"` // 类型id Name string `gorm:"not null;"json:"name"` // 商品名称 IsPay int `gorm:"not null;"json:"isPay"` // 是否购买 IsCollect int `gorm:"not null;"json:"isCollect"` // 是否购买 IsStar int `gorm:"not null;"json:"isStar"` // 是否关注 IsCreate int `gorm:"not null;"json:"isCreate"` // 是否上传 IsPrePay int `gorm:"not null;"json:"isPrePay"` // 是否预购买 IsRead int `gorm:"not null;"json:"isRead"` // 是否阅读 PartId int `gorm:"not null"json:"partid"` //部门分类 }
type UserOpen ¶
type UserOpen struct { Id int `json:"id" form:"id" gorm:"primary_key"` // 主键ID CreatedAt time.Time `gorm:""json:"createdAt"` // 创建时间 UpdatedAt time.Time `gorm:""json:"updatedAt"` // 更新时间 DeletedAt *time.Time `gorm:"index"json:"deletedAt"` // 删除时间 Genre int `gorm:"not null;"json:"genre"` // 类型 [1微信(app 小程序 公众号 unionid区分) 2QQ 3微博] Uid int `gorm:"not null;"json:"uid"` WechatOpenid string `gorm:"not null;index"json:"wechatOpenid"` // openid (如果类型是微信 则代表公众号openid) AppOpenid string `gorm:"not null;"json:"appOpenid"` // app_openid (如果类型是微信 则代表开放平台openid) MiniOpenid string `gorm:"not null;"json:"miniOpenid"` // mini_openid (如果类型是微信 则代表小程序openid) MiniOpenid2 string `gorm:"not null;"json:"miniOpenid2"` // delivery mini_openid Unionid string `gorm:"not null;"json:"unionid"` // unionid AccessToken string `gorm:"not null;"json:"accessToken"` // access_token ExpiresIn int `gorm:"not null;"json:"expiresIn"` // access_token过期时间 RefreshToken string `gorm:"not null;"json:"refreshToken"` // access_token过期可用该字段刷新用户access_token Scope string `gorm:"not null;"json:"scope"` // 应用授权作用域 Nickname string `gorm:"not null;"json:"nickname"` // 用户来源平台的昵称 Avatar string `gorm:"not null;"json:"avatar"` // 头像 Sex int `gorm:"not null;"json:"sex"` // 性别[1男 2女] Country string `gorm:"not null;"json:"country"` // 国家 Province string `gorm:"not null;"json:"province"` // 省份 City string `gorm:"not null;"json:"city"` // 城市 State int `gorm:"not null;"json:"state"` // 是否绑定主帐号[默认0否 1是] Telephone string `gorm:"not null;"json:"telephone"` // 电话 Email string `gorm:"not null;"json:"email"` // 邮箱 Name string `gorm:"not null;"json:"name"` // 用户在所有平台唯一昵称 Intro string `gorm:"not null;"json:"intro"` PartId int `gorm:"not null"json:"partid"` //部门分类 }
Source Files ¶
- access_token.go
- address.go
- address_type.go
- addtion.go
- admin_user.go
- attachment.go
- banner.go
- cart.go
- com.go
- com_cate.go
- com_image.go
- com_relate_cate.go
- com_sku.go
- com_spec.go
- com_spec_value.go
- com_store.go
- comment.go
- doc.gen.go
- freight.go
- image.go
- mysql.gen.go
- order.addition.go
- order.go
- order_com.go
- order_extend.go
- order_log.go
- order_pay.go
- point_limit.go
- point_log.go
- signin.go
- signin_log.go
- user.go
- user_goods.go
- user_open.go
Click to show internal directories.
Click to hide internal directories.