package model

const (
	ConfigTypeSys          = "Sys"
	ConfigTypePricePack    = "PricePack"
	ConfigTypeFreightPack  = "FreightPack"
	ConfigTypeBank         = "Bank"
	ConfigTypeRole         = "Role"
	ConfigTypeJxStore      = "JxStore"
	ConfigTypeCookie       = "Cookie"
	ConfigTypeDiscountCard = "DiscountCard"
	ConfigTypeReply        = "Reply"
	ConfigTypeApplication  = "App"
)

const (
	ConfigSysFakeOrderMobiles = "FakeOrderMobiles" // 假订单手机
	ConfigSysEbaiBoxFee       = "EbaiBoxFee"       // 饿百打包费
	ConfigSysMtwmBoxFee       = "MtwmBoxFee"       // 美团外卖打包费
	ConfigSysMtwmSkuBoxFee    = "MtwmSkuBoxFee"    // 美团外卖单商品打包费
)

var (
	ConfigTypeName = map[string]string{
		ConfigTypeSys:          "系统",
		ConfigTypePricePack:    "价格包",
		ConfigTypeFreightPack:  "免运包",
		ConfigTypeBank:         "银行",
		ConfigTypeRole:         "角色",
		ConfigTypeJxStore:      "京西商城",
		ConfigTypeCookie:       "Cookie",
		ConfigTypeDiscountCard: "会员折扣卡",
		ConfigTypeReply:        "评论回复模板",
	}
)

type NewConfig struct {
	ModelIDCULD

	Type  string `orm:"size(16)" json:"type"`
	Key   string `orm:"size(32)" json:"key"`
	Value string `orm:"size(9999)" json:"value"`
}

func (*NewConfig) TableUnique() [][]string {
	return [][]string{
		[]string{"Key", "Type", "DeletedAt"},
		[]string{"Type", "Key", "DeletedAt"},
	}
}
