新增接口及逻辑处理
This commit is contained in:
@@ -97,40 +97,44 @@ type PetGoods struct {
|
||||
|
||||
// SystemConfig 系统配置
|
||||
type SystemConfig struct {
|
||||
id int `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
Name string `json:"name"` //名称
|
||||
Desc string `json:"desc"` //描述
|
||||
ConfigType string `json:"configType"` //类型 1关于我们 2在线客服 3拨打电话
|
||||
DescType int `json:"descType"` //1文本 2链接
|
||||
Id int `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
Name string `json:"name"` //名称
|
||||
Content string `json:"content"` //内容
|
||||
ConfigType string `json:"configType"` //类型 0banner 1关于我们 2客服电话
|
||||
ContentType int `json:"contentType"` //1文本 2链接
|
||||
Sort int `json:"sort"` //排序位
|
||||
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
|
||||
}
|
||||
|
||||
// OrderMain 主订单
|
||||
type OrderMain struct {
|
||||
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
OrderId string `gorm:"index;unique;not null" json:"orderId"` //主订单号
|
||||
Uid int64 `gorm:"index;not null" json:"uid"` //用户id
|
||||
Status int `json:"status"` //主订单状态 1待服务 2服务中 3已完成 4已派单 5已取消
|
||||
ServiceTime string `json:"serviceTime"` //服务时间
|
||||
ServiceAddrId int64 `json:"serviceAddrId"` //服务地址信息
|
||||
ServiceRemark string `json:"serviceRemark"` //服务备注
|
||||
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"` //创建时间
|
||||
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
OrderId string `gorm:"index;unique;not null" json:"orderId"` //主订单号
|
||||
Uid int64 `gorm:"index;not null" json:"uid"` //用户id
|
||||
Status int `json:"status"` //主订单状态 1待服务 2服务中 3已完成 4已派单 5已取消
|
||||
ServiceTime string `json:"serviceTime"` //服务时间
|
||||
ProjectionServiceTime int `json:"projectionServiceTime"` //服务预估时长
|
||||
ServiceAddrId int64 `json:"serviceAddrId"` //服务地址信息
|
||||
ServiceRemark string `json:"serviceRemark"` //服务备注
|
||||
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"` //创建时间
|
||||
}
|
||||
|
||||
// OrderSub 子订单
|
||||
type OrderSub struct {
|
||||
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
OrderId string `gorm:"index" json:"orderId"` //子订单ID
|
||||
MainOrderId string `gorm:"index" json:"mainOrderId"` //主订单ID
|
||||
Status int `gorm:"not null" json:"status"` //子订单状态 1待服务 2服务中 3已完成 4已取消
|
||||
PetId int64 `gorm:"index" json:"petId"` //宠物ID
|
||||
PayType int `gorm:"not null" json:"payType"` //支付方式 1线下 2线上
|
||||
Discount int `json:"discount"` //折扣
|
||||
TotalAmount int32 `gorm:"not null" json:"totalAmount"` //总金额
|
||||
PayAmount int32 `json:"payAmount"` //实际支付金额
|
||||
PayTime time.Time `gorm:"type:timestamp;" json:"payTime"` //支付时间
|
||||
PayRemark string `json:"payRemark"` //支付备注
|
||||
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"` //创建时间
|
||||
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
|
||||
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
|
||||
OrderId string `gorm:"index" json:"orderId"` //子订单ID
|
||||
MainOrderId string `gorm:"index" json:"mainOrderId"` //主订单ID
|
||||
Status int `gorm:"not null" json:"status"` //子订单状态 1待服务 2服务中 3已完成 4已取消
|
||||
PetId int64 `gorm:"index" json:"petId"` //宠物ID
|
||||
PayType int `gorm:"not null" json:"payType"` //支付方式 1线下 2线上
|
||||
Discount int `json:"discount"` //折扣
|
||||
TotalAmount int32 `gorm:"not null" json:"totalAmount"` //总金额
|
||||
ProjectionServiceTime int `json:"projectionServiceTime"` //服务预估时长
|
||||
PayAmount int32 `json:"payAmount"` //实际支付金额
|
||||
PayTime time.Time `gorm:"type:timestamp;" json:"payTime"` //支付时间
|
||||
PayRemark string `json:"payRemark"` //支付备注
|
||||
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"` //创建时间
|
||||
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
|
||||
}
|
||||
|
||||
// OrderDetail 订单明细
|
||||
|
||||
Reference in New Issue
Block a user