feat: test product
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package dao
|
||||
|
||||
// 编辑日志对象类型
|
||||
const (
|
||||
EditLogTypeProduct uint8 = 1 // 产品
|
||||
EditLogTypeStore uint8 = 2 // 门店
|
||||
EditLogTypeAddress uint8 = 3 // 地址
|
||||
EditLogTypeSales uint8 = 4 // 销售
|
||||
)
|
||||
|
||||
// 编辑申请状态(Redis / action_apply_log)
|
||||
const (
|
||||
ApplyStatusDone uint8 = 1 // 通过,可编辑
|
||||
ApplyStatusNotPass uint8 = 2 // 驳回
|
||||
ApplyStatusWaitPass uint8 = 9 // 待审核
|
||||
)
|
||||
|
||||
type EditLogCreate struct {
|
||||
Id int `gorm:"column:id;primaryKey;autoIncrement"`
|
||||
ObjId int `gorm:"column:obj_id"`
|
||||
ObjType uint8 `gorm:"column:obj_type"`
|
||||
Content string `gorm:"column:content"`
|
||||
AdminId int `gorm:"column:admin_id"`
|
||||
AdminName string `gorm:"column:admin_name"`
|
||||
}
|
||||
|
||||
type ActionApplyLogCreate struct {
|
||||
Id int `gorm:"column:id;primaryKey;autoIncrement"`
|
||||
AdminId int `gorm:"column:admin_id"`
|
||||
ObjId int `gorm:"column:obj_id"`
|
||||
Type uint8 `gorm:"column:type"`
|
||||
Reason string `gorm:"column:reason"`
|
||||
Status uint8 `gorm:"column:status"`
|
||||
}
|
||||
@@ -130,22 +130,44 @@ type ProductVerify struct {
|
||||
}
|
||||
|
||||
type ProductEditBase struct {
|
||||
Id int `gorm:"column:id;primaryKey"`
|
||||
Name string `gorm:"column:name"`
|
||||
Subhead string `gorm:"column:subhead"`
|
||||
Content string `gorm:"column:content"`
|
||||
Images string `gorm:"column:images"`
|
||||
Weight float32 `gorm:"column:weight"`
|
||||
Cubage string `gorm:"column:cubage"`
|
||||
Waybill string `gorm:"column:waybill"`
|
||||
Label string `gorm:"column:label"`
|
||||
IsIndex uint8 `gorm:"column:is_index"`
|
||||
IndexImage string `gorm:"column:index_image"`
|
||||
PeriodValidity int16 `gorm:"column:period_validity"`
|
||||
IsBuy uint8 `gorm:"column:is_buy"`
|
||||
PublishTime time.Time `gorm:"column:publish_time"`
|
||||
AdminName string `gorm:"column:admin_name"`
|
||||
AdminId int `gorm:"column:admin_id"`
|
||||
Id int `gorm:"column:id;primaryKey" json:"id"`
|
||||
Name string `gorm:"column:name" json:"name"`
|
||||
Subhead string `gorm:"column:subhead" json:"subhead"`
|
||||
Content string `gorm:"column:content" json:"content"`
|
||||
Images string `gorm:"column:images" json:"images"`
|
||||
Weight float32 `gorm:"column:weight" json:"weight"`
|
||||
Cubage string `gorm:"column:cubage" json:"cubage"`
|
||||
Waybill string `gorm:"column:waybill" json:"waybill"`
|
||||
Label string `gorm:"column:label" json:"label"`
|
||||
IsIndex uint8 `gorm:"column:is_index" json:"is_index"`
|
||||
IndexImage string `gorm:"column:index_image" json:"index_image"`
|
||||
PeriodValidity int16 `gorm:"column:period_validity" json:"period_validity"`
|
||||
IsBuy uint8 `gorm:"column:is_buy" json:"is_buy"`
|
||||
PublishTime time.Time `gorm:"column:publish_time" json:"publish_time"`
|
||||
AdminName string `gorm:"column:admin_name" json:"admin_name"`
|
||||
AdminId int `gorm:"column:admin_id" json:"admin_id"`
|
||||
}
|
||||
|
||||
// ProductEditSusceptible 敏感字段(查询旧值 / 写入 verify 快照)
|
||||
type ProductEditSusceptible struct {
|
||||
Id int `gorm:"column:id" json:"id"`
|
||||
ModelCode string `gorm:"column:model_code" json:"model_code"`
|
||||
Price float32 `gorm:"column:price" json:"price"`
|
||||
StorePrice float32 `gorm:"column:store_price" json:"store_price"`
|
||||
SalePrice float32 `gorm:"column:sale_price" json:"sale_price"`
|
||||
SharePrice float32 `gorm:"column:share_price" json:"share_price"`
|
||||
AgentPrice float32 `gorm:"column:agent_price" json:"agent_price"`
|
||||
SaleReward string `gorm:"column:sale_reward" json:"sale_reward"`
|
||||
BoxNumber float64 `gorm:"column:box_number" json:"box_number"`
|
||||
Type uint8 `gorm:"column:type" json:"type"`
|
||||
NormsNumber uint8 `gorm:"column:norms_number" json:"norms_number"`
|
||||
AdminName string `gorm:"column:admin_name" json:"admin_name"`
|
||||
AdminId int `gorm:"column:admin_id" json:"admin_id"`
|
||||
}
|
||||
|
||||
// ProductVerifyFirstEditStatus 敏感编辑提交后置为一审中
|
||||
type ProductVerifyFirstEditStatus struct {
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
}
|
||||
|
||||
// ProductInfo 列表/详情查询投影
|
||||
@@ -206,3 +228,54 @@ type ProductSort struct {
|
||||
AdminName string `gorm:"column:admin_name" json:"admin_name"`
|
||||
AdminId int `gorm:"column:admin_id" json:"admin_id"`
|
||||
}
|
||||
|
||||
// ProductVerifyListRow 审核列表产品侧字段
|
||||
type ProductVerifyListRow struct {
|
||||
Id int `gorm:"column:id"`
|
||||
Name string `gorm:"column:name"`
|
||||
ModelCode string `gorm:"column:model_code"`
|
||||
Price float32 `gorm:"column:price"`
|
||||
StorePrice float32 `gorm:"column:store_price"`
|
||||
SalePrice float32 `gorm:"column:sale_price"`
|
||||
SharePrice float32 `gorm:"column:share_price"`
|
||||
AgentPrice float32 `gorm:"column:agent_price"`
|
||||
SaleReward string `gorm:"column:sale_reward"`
|
||||
SalesModel uint8 `gorm:"column:sales_model"`
|
||||
Type uint8 `gorm:"column:type"`
|
||||
NormsNumber uint8 `gorm:"column:norms_number"`
|
||||
BoxNumber float64 `gorm:"column:box_number"`
|
||||
}
|
||||
|
||||
// ProductVerifyFirstStatus 一审后回写产品审核状态
|
||||
type ProductVerifyFirstStatus struct {
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
VerifyId int `gorm:"column:verify_id"`
|
||||
VerifyName string `gorm:"column:verify_name"`
|
||||
Reason string `gorm:"column:reason"`
|
||||
}
|
||||
|
||||
// ProductVerifySecondStatus 二审驳回回写
|
||||
type ProductVerifySecondStatus struct {
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
VerifySecondId int `gorm:"column:verify_second_id"`
|
||||
VerifySecondName string `gorm:"column:verify_second_name"`
|
||||
Reason string `gorm:"column:reason"`
|
||||
}
|
||||
|
||||
// ProductVerifySecondOkStatus 二审通过:应用快照并回写审核人
|
||||
type ProductVerifySecondOkStatus struct {
|
||||
ModelCode string `gorm:"column:model_code"`
|
||||
Price float32 `gorm:"column:price"`
|
||||
StorePrice float32 `gorm:"column:store_price"`
|
||||
SalePrice float32 `gorm:"column:sale_price"`
|
||||
SharePrice float32 `gorm:"column:share_price"`
|
||||
AgentPrice float32 `gorm:"column:agent_price"`
|
||||
SaleReward string `gorm:"column:sale_reward"`
|
||||
Type uint8 `gorm:"column:type"`
|
||||
NormsNumber uint8 `gorm:"column:norms_number"`
|
||||
BoxNumber float64 `gorm:"column:box_number"`
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
VerifySecondId int `gorm:"column:verify_second_id"`
|
||||
VerifySecondName string `gorm:"column:verify_second_name"`
|
||||
Reason string `gorm:"column:reason"`
|
||||
}
|
||||
|
||||
@@ -11,6 +11,18 @@ const (
|
||||
VerifyTypeRefund uint8 = 5 // 退款
|
||||
)
|
||||
|
||||
// 审核操作结果(请求 status)
|
||||
const (
|
||||
VerifyActionPass uint8 = 1 // 通过
|
||||
VerifyActionReject uint8 = 2 // 驳回
|
||||
)
|
||||
|
||||
// 审核列表筛选(请求 status)
|
||||
const (
|
||||
VerifyListFirst uint8 = 1 // 一审列表
|
||||
VerifyListSecond uint8 = 2 // 二审列表
|
||||
)
|
||||
|
||||
// Verify 审核表完整字段映射
|
||||
type Verify struct {
|
||||
Id int `gorm:"column:id;primaryKey;autoIncrement"`
|
||||
@@ -33,3 +45,44 @@ type VerifyCreate struct {
|
||||
Content string `gorm:"column:content"`
|
||||
Type uint8 `gorm:"column:type"`
|
||||
}
|
||||
|
||||
// VerifyInfo 审核列表关联查询
|
||||
type VerifyInfo struct {
|
||||
Id int `gorm:"column:id"`
|
||||
VerifyId string `gorm:"column:verify_id"`
|
||||
Content string `gorm:"column:content"`
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
Type uint8 `gorm:"column:type"`
|
||||
}
|
||||
|
||||
// VerifyStatusRow 审核操作加载行
|
||||
type VerifyStatusRow struct {
|
||||
Id int `gorm:"column:id"`
|
||||
VerifyId string `gorm:"column:verify_id"`
|
||||
AdminId int `gorm:"column:admin_id"`
|
||||
AdminName string `gorm:"column:admin_name"`
|
||||
AdminSecondId int `gorm:"column:admin_second_id"`
|
||||
AdminSecondName string `gorm:"column:admin_second_name"`
|
||||
Content string `gorm:"column:content"`
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
VerifyReason string `gorm:"column:verify_reason"`
|
||||
VerifyTime time.Time `gorm:"column:verify_time"`
|
||||
}
|
||||
|
||||
// VerifyFirstUpdate 一审回写审核表
|
||||
type VerifyFirstUpdate struct {
|
||||
AdminId int `gorm:"column:admin_id"`
|
||||
AdminName string `gorm:"column:admin_name"`
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
VerifyReason string `gorm:"column:verify_reason"`
|
||||
VerifyTime time.Time `gorm:"column:verify_time"`
|
||||
}
|
||||
|
||||
// VerifySecondUpdate 二审回写审核表
|
||||
type VerifySecondUpdate struct {
|
||||
AdminSecondId int `gorm:"column:admin_second_id"`
|
||||
AdminSecondName string `gorm:"column:admin_second_name"`
|
||||
VerifyStatus uint8 `gorm:"column:verify_status"`
|
||||
VerifyReason string `gorm:"column:verify_reason"`
|
||||
VerifyTime time.Time `gorm:"column:verify_time"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user