Documentation ¶
Index ¶
- Constants
- func GetFreeShipLabel(freeShipType string) string
- type Ship
- type ShipDB
- func (db *ShipDB) Delete(shipID int) error
- func (db *ShipDB) GetByID(shipID int) (*Ship, error)
- func (db *ShipDB) GetByProvinceCode(provinceCode string) (*Ship, error)
- func (db *ShipDB) Insert(ship *Ship) error
- func (db *ShipDB) List() ([]Ship, error)
- func (db *ShipDB) Update(shipID int, shipPrice, freeShipPrice float32, freeShipType string, ...) error
- type ShipTx
Constants ¶
View Source
const ( // FreeShipNone 不包邮 FreeShipNone = "NONE" // FreeShipCount 购满数量包邮 FreeShipCount = "COUNT" // FreeShipPrice 购满金额包邮 FreeShipPrice = "PRICE" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ship ¶
type Ship struct { ShipID int `json:"shipID" db:"ship_id"` // 物流ID Active bool `json:"active" db:"active"` // 是否可用 GroupLabel string `json:"groupLabel" db:"group_label"` // 分组名称,例如:低邮费区域,偏远区域 ProvinceCode string `json:"provinceCode" db:"province_code"` // 省代码 ProvinceName string `json:"provinceName" db:"province_name"` // 省名称 ShipPrice float32 `json:"shipPrice" db:"ship_price"` // 邮费 FreeShipType string `json:"freeShipType" db:"free_ship_type"` // 包邮方式,none不包邮,count购满数量包邮,price购满金额包邮 FreeShipCount int `json:"freeShipCount" db:"free_ship_count"` // 购满数量包邮 FreeShipPrice float32 `json:"freeShipPrice" db:"free_ship_price"` // 购满金额包邮 CreateTime time.Time `json:"createTime" db:"create_time"` // 创建时间 UpdateTime time.Time `json:"updateTime" db:"update_time"` // 更新时间 }
Ship 物流
Click to show internal directories.
Click to hide internal directories.