新增admin

This commit is contained in:
yan.y
2024-03-29 22:05:43 +08:00
parent f716403e8e
commit 53e9f1cbab
12 changed files with 1223 additions and 24 deletions
+55 -1
View File
@@ -75,7 +75,7 @@ type Goods struct {
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //商品ID
Name string `gorm:"not null" json:"name"` //商品名称
GoodsType int `gorm:"not null" json:"goodsType"` //商品类型 1基础服务 2附加产品 3附加服务
Time string `json:"time"` //时间
Time string `json:"time;default:'/'"` //时间
Price int32 `gorm:"not null" json:"price"` //价格
ParentId int64 `gorm:"not null" json:"parentId"` //商品父ID
BuyMany int `gorm:"not null" json:"buyMany"` //同类型是否可购买多个 0否 1是
@@ -139,3 +139,57 @@ type OrderDetail struct {
GoodsId int64 `gorm:"index;not null" json:"goodsId"` //商品ID
Amount int32 `gorm:"not null" json:"amount"` //价格
}
// ServiceCar 服务车辆
type ServiceCar struct {
Id int `gorm:"primaryKey;autoIncrement" json:"id"` //id
CarNo string `gorm:"index;not null" json:"carNo"` //车牌号
CarModel string `json:"carModel"` //车辆型号
ServiceAddr int64 `gorm:"not null" json:"serviceAddr"` //服务地址ID
ServiceStatus int `gorm:"not null" json:"serviceStatus"` //当前服务状态 0空闲中 1排单中 2服务中
NowServiceAddr string `json:"nowServiceAddr"` //当前服务地址 开始服务记录位置
NowLongitude string `json:"nowLongitude"` //当前服务位置经度
NowLatitude string `json:"nowLatitude"` //当前服务位置维度
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
}
// CarOrder 车辆订单
type CarOrder struct {
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
CarId int `gorm:"index;not null" json:"carId"` //车辆ID
OrderId string `gorm:"index;not null" json:"orderId"` //订单ID
Remark string `json:"remark"` //备注
PredictionServiceTime int `json:"predictionServiceTime"` //预计服务时间
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
}
// ServiceCarUser 随车人员
type ServiceCarUser struct {
Id int `gorm:"primaryKey;autoIncrement" json:"id"` //id
CarId int `gorm:"index;not null" json:"carId"` //车ID
Uid int64 `gorm:"index;not null" json:"uid"` //用户ID
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
}
// ServiceUserMark 服务人员评分
type ServiceUserMark struct {
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
ServiceStar int `gorm:"default:5" json:"serviceStar"` //服务星级
ServiceLabels string `json:"serviceLabels"` //服务标签
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
}
// ServiceUserMarkRecord 服务人员评分记录
type ServiceUserMarkRecord struct {
Id int64 `gorm:"primaryKey;autoIncrement" json:"id"` //id
Uid int64 `gorm:"index;not null" json:"uid"` //评价用户
ServiceStar int `gorm:"default:5" json:"serviceStar"` //服务星级
ServiceLabels string `json:"serviceLabels"` //服务标签
MarkContext string `json:"markContext"` //评价内容
CreateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP" json:"-"` //创建时间
UpdateTime time.Time `gorm:"type:timestamp;default:CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP" json:"-"` //更新时间
}