Documentation ¶
Index ¶
- type Address
- type AddressDeleteParam
- type AddressInfo
- type AddressInfoParam
- type AddressList
- type AddressListParam
- type AddressSaveParam
- type BannerList
- type BannerQueryParam
- type CartAddParam
- type CartClearParam
- type CartDeleteParam
- type CartInfo
- type CartItem
- type CartQueryParam
- type Category
- type CategoryOption
- type CategoryQueryParam
- type Code2Session
- type Code2SessionResult
- type Goods
- type GoodsInfo
- type GoodsInfoParam
- type GoodsItem
- type GoodsList
- type GoodsQueryParam
- type GoodsSearchParam
- type Market
- type Order
- type OrderList
- type OrderQueryParam
- type OrderSubmitParam
- type OrderUpdateParam
- type User
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Id uint64 `gorm:"primaryKey"` // 地址编号 OpenId string `gorm:"open_id"` // 微信用户ID Name string `gorm:"name"` // 收货人姓名 Mobile string `gorm:"mobile"` // 手机号 Province string `gorm:"province"` // 省份 City string `gorm:"city"` // 城市 District string `gorm:"district"` // 区(县) DetailedAddress string `gorm:"detailed_address"` // 详细地址 IsDefault int `gorm:"is_default"` // 是否默认,1-默认,2-非默认 Created string `gorm:"created"` // 创建时间 Updated string `gorm:"updated"` // 更新时间 }
收货地址映射模型
type AddressDeleteParam ¶
type AddressDeleteParam struct {
Id uint64 `form:"id" binding:"required,gt=0"`
}
收货地址删除参数模型
type AddressInfo ¶
type AddressInfo struct { Id uint `json:"id"` Name string `json:"name"` Mobile string `json:"mobile"` Province string `json:"province"` City string `json:"city"` District string `json:"district"` DetailedAddress string `json:"detailedAddress"` IsDefault int `json:"isDefault"` }
收货地址信息传输模型
type AddressList ¶
type AddressList struct { Id uint64 `json:"id"` Name string `json:"name"` Mobile string `json:"mobile"` Province string `json:"province"` City string `json:"city"` District string `json:"district"` DetailedAddress string `json:"detailedAddress"` IsDefault int `json:"isDefault"` }
收货地址列表传输模型
type AddressListParam ¶
type AddressListParam struct {
OpenId string `form:"openId" json:"openId"`
}
收货地址列表查询参数模型
type AddressSaveParam ¶
type AddressSaveParam struct { Id uint64 `form:"id"` OpenId string `form:"openId" binding:"required"` Name string `form:"name" binding:"required"` Mobile string `form:"mobile" binding:"required"` Province string `form:"province" binding:"required"` City string `form:"city" binding:"required"` District string `form:"district" binding:"required"` DetailedAddress string `form:"detailedAddress" binding:"required"` IsDefault int `form:"isDefault" binding:"required,gt=0"` }
收货地址保存参数模型
type BannerList ¶
type BannerList struct { BannerImage string `json:"bannerImage"` GoodsIds string `json:"goodsIds"` }
钻展列表传输模型
type BannerQueryParam ¶
type BannerQueryParam struct {
Sid uint64 `form:"sid" binding:"required,gt=0"`
}
钻展列表查询参数模型
type CartAddParam ¶
type CartAddParam struct { GoodsId uint `form:"goodsId" binding:"required"` GoodsCount uint `form:"goodsCount" binding:"required"` OpenId string `form:"openId" binding:"required"` }
购物车添加参数模型
type CartClearParam ¶
type CartClearParam struct {
OpenId string `form:"openId" binding:"required"`
}
购物车清除参数模型
type CartDeleteParam ¶
type CartDeleteParam struct { OpenId string `form:"openId" binding:"required"` GoodsId string `form:"goodsId" binding:"required"` }
购物车删除参数模型
type CartInfo ¶
type CartInfo struct { CartItem []CartItem `json:"cartItem"` TotalPrice float64 `json:"totalPrice"` }
购物车信息传输模型
type CartItem ¶
type CartItem struct { Id uint64 `gorm:"primaryKey" json:"id"` ImageUrl string `gorm:"image_url" json:"imageUrl"` Title string `gorm:"title" json:"title"` Price float64 `gorm:"price" json:"price"` Count int `gorm:"count" json:"count"` }
购物车商品项传输模型
type Category ¶
type Category struct { Id uint64 `gorm:"primaryKey"` // 类目编号 Name string `gorm:"name"` // 类目名称 ParentId uint64 `gorm:"parent_id"` // 父级编号 Level uint `gorm:"level"` // 类目级别 Sort uint `gorm:"sort"` // 类目排序 Created string `gorm:"created"` // 创建时间 Updated string `gorm:"updated"` // 更新时间 Sid uint64 `gorm:"sid"` // 店铺编号 }
商品类目映射模型
type CategoryOption ¶
商品类目选项传输模型
type CategoryQueryParam ¶
type CategoryQueryParam struct {
Sid uint64 `form:"sid" binding:"required,gt=0"`
}
类目选项查询参数模型
type Code2Session ¶
用户登录凭证校验模型
type Code2SessionResult ¶
type Code2SessionResult struct { OpenId string `json:"openid"` SessionKey string `json:"session_key"` UnionId string `json:"unionid"` ErrCode uint `json:"errcode"` ErrMsg string `json:"errmsg"` }
凭证校验后返回的JSON数据包模型
type Goods ¶
type Goods struct { Id uint64 `gorm:"id"` // 商品编号 CategoryId uint64 `gorm:"category_id"` // 类目编号 Title string `gorm:"title"` // 商品标题 Name string `gorm:"name"` // 商品名称 Price float64 `gorm:"price"` // 商品价格 Quantity uint `gorm:"quantity"` // 商品数量 ImageUrl string `gorm:"image_url"` // 商品图片 Remark string `gorm:"remark"` // 商品备注 Sales uint `gorm:"sales"` // 商品销量 Status uint `gorm:"status"` // 商品状态,1-出售中,2-仓库中 Created string `gorm:"created"` // 创建时间 Updated string `gorm:"updated"` // 更新时间 Sid uint64 `gorm:"sid"` // 店铺编号 }
商品映射模型
type GoodsInfo ¶
type GoodsInfo struct { Id uint64 `json:"id"` Title string `json:"title"` Name string `json:"name"` Price float64 `json:"price"` ImageUrl string `json:"imageUrl"` Remark string `json:"remark"` }
商品详情传输模型
type GoodsInfoParam ¶
type GoodsInfoParam struct {
Id uint64 `form:"id" binding:"required,gt=0"`
}
商品详情参数模型
type GoodsItem ¶
type GoodsItem struct { Id uint64 `json:"id"` Title string `json:"title"` Price float64 `json:"price"` ImageUrl string `json:"imageUrl"` Count int `json:"count"` }
订单商品项传输模型
type GoodsList ¶
type GoodsList struct { Id uint64 `json:"id"` ImageUrl string `json:"imageUrl"` Title string `json:"title"` Sales uint `json:"sales"` Price float64 `json:"price"` }
商品列表传输模型
type GoodsQueryParam ¶
type GoodsQueryParam struct { CategoryId uint64 `form:"categoryId"` Sid uint64 `form:"sid" binding:"required,gt=0"` }
商品列表参数模型
type GoodsSearchParam ¶
type GoodsSearchParam struct {
KeyWord string `form:"keyWord" binding:"required"`
}
商品搜索参数模型
type Market ¶
type Market struct { Id uint64 `gorm:"primaryKey"` // 编号 Name string `gorm:"name"` // 名称 Type int `gorm:"type"` // 类型 BannerImage string `json:"banner_image"` // 活动图片 BeginTime string `gorm:"begin_time"` // 开始时间 OverTime string `gorm:"over_time"` // 结束时间 GoodsIds string `gorm:"goods_ids"` // 关联商品 Status int `gorm:"status"` // 状态,1-开启,2-关闭 Created string `gorm:"created"` // 创建时间 Updated string `gorm:"updated"` // 更新时间 Sid uint64 `gorm:"sid"` // 店铺编号 }
营销数据映射模型
type Order ¶
type Order struct { Id uint64 `gorm:"primaryKey"` OpenId string `gorm:"open_id"` GoodsIdsCount string `gorm:"goods_ids_count"` GoodsCount uint `gorm:"goods_count"` TotalPrice float64 `gorm:"total_price"` AddressId uint64 `gorm:"address_id"` Status int `gorm:"status"` // 订单状态,1-待付款,2-已取消,3-已付款,4-配送中,5-已完成 Created string `gorm:"created"` Updated string `gorm:"updated"` Sid uint64 `gorm:"sid"` // 店铺编号 }
数据库,订单数据映射模型
type OrderList ¶
type OrderList struct { Id uint64 `json:"id"` Status int `json:"status"` TotalPrice float64 `json:"totalPrice"` GoodsCount uint `json:"goodsCount"` GoodsItem []GoodsItem `json:"goodsItem"` }
订单列表传输模型
type OrderQueryParam ¶
type OrderQueryParam struct { Type int `form:"type" json:"type"` OpenId string `form:"openId" json:"openId"` Sid uint64 `form:"sid" binding:"required,gt=0"` }
订单查询参数模型
type OrderSubmitParam ¶
type OrderSubmitParam struct { OpenId string `form:"openId" json:"openId" binding:"required"` Sid uint64 `form:"sid" json:"sid" binding:"required,gt=0"` }
订单提交参数模型
type OrderUpdateParam ¶
type OrderUpdateParam struct { Id uint64 `form:"id" binding:"required,gt=0"` Status int `form:"status" binding:"required,gt=0"` }
订单更新参数模型
type User ¶
type User struct { Id uint64 `gorm:"primaryKey"` // 用户编号 OpenId string `gorm:"open_id"` // 微信用户唯一标识 Username string `gorm:"username"` // 用户名称 Password string `gorm:"password"` // 用户密码 Status uint `gorm:"status"` // 用户状态 Created string `gorm:"created"` // 创建时间 Updated string `gorm:"updated"` // 更新时间 }
用户数据映射模型
Source Files ¶
Click to show internal directories.
Click to hide internal directories.