This commit is contained in:
yan.y
2024-05-14 23:42:22 +08:00
parent 19f2cac258
commit 2f90ee9e17
10 changed files with 89 additions and 31 deletions
+9 -6
View File
@@ -39,6 +39,7 @@ type Pet struct {
LastServiceProj string `gorm:"default:'-'" json:"lastServiceProj"` //上次服务项目
LastServiceDate string `gorm:"default:'-'" json:"lastServiceDate"` //上次服务时间
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP;not null" json:"createTime"` //创建时间
Status int `gorm:"default:1" json:"status"` //信息状态
}
// PetBaseInfo 宠物基础信息
@@ -53,12 +54,12 @@ type PetBaseInfo struct {
// ServiceAddr 服务地址
type ServiceAddr struct {
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //ID
Longitude string `json:"longitude"` //经度
Latitude string `json:"latitude"` //纬度
Addr string `gorm:"not null" json:"addr"` //详细地址
DistantGapMeters float64 `gorm:"not null" json:"distantGapMeters"` //服务最远距离 单位/米
ServiceArea string `json:"serviceArea"` //服务区域
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //ID
Longitude string `json:"longitude"` //经度
Latitude string `json:"latitude"` //纬度
Addr string `gorm:"not null" json:"addr"` //详细地址
DistantGapMeters int64 `gorm:"not null" json:"distantGapMeters"` //服务最远距离 单位/米
ServiceArea string `json:"serviceArea"` //服务区域
}
// UserServiceAddr 用户服务地址
@@ -130,6 +131,7 @@ type OrderMain struct {
PayStatus int `gorm:"default:0" json:"payStatus"` //支付状态 0未支付 1已支付
DispatchStatus int `gorm:"default:0" json:"dispatchStatus"` //派单状态 0未派单 1已派单
PayTotalAmount int `json:"payTotalAmount"` //支付总金额
PayDiscount int `gorm:"default:0" json:"payDiscount"` //支付折扣
}
// OrderSub 子订单
@@ -147,6 +149,7 @@ type OrderSub struct {
PayAmount int32 `json:"payAmount"` //实际支付金额
PayTime time.Time `gorm:"type:timestamp;" json:"payTime"` //支付时间
PayRemark string `json:"payRemark"` //支付备注
PetInfo string `json:"petInfo"` //宠物快照信息
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:"-"` //更新时间
}