This commit is contained in:
yan.y
2024-06-26 12:05:10 +08:00
parent e05bf0ff48
commit 8729de390f
7 changed files with 211 additions and 69 deletions
+24 -2
View File
@@ -19,6 +19,7 @@ type User struct {
Role int `json:"role"` //用户角色 0普通用户 1护理人员
Discount int `json:"discount"` //折扣
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP;not null" json:"createTime"` //创建时间
Status int `json:"status"` //信息状态
}
// Pet 宠物信息
@@ -39,7 +40,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"` //信息状态
Status int `json:"status"` //信息状态
}
// PetBaseInfo 宠物基础信息
@@ -50,6 +51,7 @@ type PetBaseInfo struct {
Size int `gorm:"not null" json:"size"` //大小 1大 2中 3小
Hair int `gorm:"not null" json:"hair"` //毛发 0未知 1长毛 2短毛
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
Status int `json:"status"` //信息状态
}
// ServiceAddr 服务地址
@@ -60,6 +62,7 @@ type ServiceAddr struct {
Addr string `gorm:"not null" json:"addr"` //详细地址
DistantGapMeters int64 `gorm:"not null" json:"distantGapMeters"` //服务最远距离 单位/米
ServiceArea string `json:"serviceArea"` //服务区域
Status int `json:"status"` //信息状态
}
// UserServiceAddr 用户服务地址
@@ -75,6 +78,7 @@ type UserServiceAddr struct {
Area string `gorm:"-" json:"area"` //服务区域
AddrArea string `json:"addrArea"` //地址区域
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP;not null" json:"-"` //创建时间
Status int `json:"status"` //信息状态
}
// Goods 商品信息
@@ -89,6 +93,7 @@ type Goods struct {
GoodsDetail string `gorm:"not null" json:"goodsDetail"` //商品详情 图片URL
GoodsIcon string `json:"goodsIcon"` //iconUrl
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
Status int `json:"status"` //信息状态
}
// PetGoods 宠物商品
@@ -102,6 +107,7 @@ type PetGoods struct {
GoodsId int64 `gorm:"not null" json:"goodsId"` //商品ID
Sort int `gorm:"not null" json:"sort"` //排序
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
Status int `json:"status"` //信息状态
}
// SystemConfig 系统配置
@@ -133,7 +139,8 @@ type OrderMain struct {
PayTotalAmount int `json:"payTotalAmount"` //支付总金额
TotalAmount int `json:"totalAmount"` //总金额
PayDiscount int `gorm:"default:0" json:"payDiscount"` //支付折扣
PayType int `gorm:"default:1" json:"payType"` //支付方式 1线下 2线上 3会员余额
PayType int `json:"payType"` //支付方式 1线下 2线上 3会员余额
Status int `json:"status1"` //信息状态
}
// OrderSub 子订单
@@ -154,6 +161,7 @@ type OrderSub struct {
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:"-"` //更新时间
Status int `json:"status1"`
}
// OrderDetail 订单明细
@@ -173,6 +181,20 @@ type OrderServiceRecord struct {
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"` //创建时间
}
type UserAmountRecord struct {
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
UserId int64 `gorm:"index:not null" json:"userId"` //用户ID
Type int `gorm:"not null" json:"type"` //操作类型 1加 2扣
OriginAmount int `gorm:"not null" json:"originAmount"` //原始余额
ProAmount int `gorm:"not null" json:"proAmount"` //操作余额
CurrAmount int `gorm:"not null" json:"currAmount"` //剩余余额
ProScene string `gorm:"not null" json:"proScene"` //操作场景
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"createTime"` //创建时间
CreateDate time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"createDate"` //创建时间
Status int `json:"status"` //信息状态
OrderId string `json:"orderId"` //订单ID
}
// ServiceCar 服务车辆
type ServiceCar struct {
Id int `gorm:"primaryKey;autoIncrement" json:"id"` //id