- PromotionStatusName
This commit is contained in:
@@ -40,6 +40,7 @@ func InitServiceInfo(version, buildDate, gitCommit string) {
|
||||
"orderStatus": model.OrderStatusName,
|
||||
"waybillStatus": model.WaybillStatusName,
|
||||
"bankName": model.BankName,
|
||||
"promotionStatusName": model.PromotionStatusName,
|
||||
},
|
||||
}
|
||||
Init()
|
||||
|
||||
@@ -12,6 +12,10 @@ const (
|
||||
PromotionStatusEnded = 4 // 已经超过活动时间,且被显示置为结束
|
||||
)
|
||||
|
||||
var (
|
||||
PromotionStatusName map[int]string
|
||||
)
|
||||
|
||||
type Promotion struct {
|
||||
ModelIDCULD
|
||||
|
||||
@@ -25,6 +29,16 @@ type Promotion struct {
|
||||
EndAt time.Time `orm:"type(datetime);index" json:"endAt"`
|
||||
}
|
||||
|
||||
func init() {
|
||||
PromotionStatusName = map[int]string{
|
||||
PromotionStatusLocalCreated: "创建中",
|
||||
PromotionStatusRemoteFailed: "失败",
|
||||
PromotionStatusRemoteCreated: "正常",
|
||||
PromotionStatusCanceled: "取消",
|
||||
PromotionStatusEnded: "结束",
|
||||
}
|
||||
}
|
||||
|
||||
func (*Promotion) TableUnique() [][]string {
|
||||
return [][]string{
|
||||
[]string{"Name", "VendorID", "Type", "DeletedAt"},
|
||||
|
||||
Reference in New Issue
Block a user