55 lines
2.5 KiB
Go
55 lines
2.5 KiB
Go
package model
|
|
|
|
// SysVip 会员配置数据模型
|
|
type SysVip struct {
|
|
Model
|
|
Level int `gorm:"column:level;tinyint(1);default:0;comment:会员等级" json:"level"`
|
|
Title string `gorm:"column:title;varchar(100);default:'';comment:会员名称" json:"title"`
|
|
Price float64 `gorm:"column:price;decimal(10,2);default:0;comment:价格" json:"price"`
|
|
EffectTime int `gorm:"column:effect_time;tinyint(3);default:0;comment:有效时长、月" json:"effect_time"`
|
|
Discount float64 `gorm:"column:discount;decimal(10,2);default:0;comment:折扣" json:"discount"`
|
|
Currency float64 `gorm:"column:currency;decimal(10,2);default:0;comment:赠送的创新币" json:"currency"`
|
|
Function int `gorm:"column:function;tinyint(3);default:0;comment:支持功能" json:"function"`
|
|
IsHidden SysVipStatus `gorm:"column:is_hidden;tinyint(1);default:0;comment:隐藏状态" json:"is_hidden"`
|
|
IsDisabled int `gorm:"column:is_disabled;tinyint(1);default:0;comment:禁用状态,不可充值" json:"is_disabled"`
|
|
ModelDeleted
|
|
ModelAt
|
|
}
|
|
|
|
const (
|
|
// SysVipOpenFunctionForSearch 任意检索
|
|
SysVipOpenFunctionForSearch int = 1 << 0
|
|
// SysVipOpenFunctionForAchievementPush 创新科技资源自动匹配推送功能
|
|
SysVipOpenFunctionForAchievementPush int = 1 << 1
|
|
// SysVipOpenFunctionForHighCompanyDemand 上市公司及优质客户的企业需求优先推送
|
|
SysVipOpenFunctionForHighCompanyDemand int = 1 << 2
|
|
// SysVipOpenFunctionForOrdinaryCompanyDemand 普通企业的需求匹配推送
|
|
SysVipOpenFunctionForOrdinaryCompanyDemand int = 1 << 3
|
|
// SysVipOpenFunctionForMachImport 匹配结果文件导出
|
|
SysVipOpenFunctionForMachImport int = 1 << 4
|
|
// SysVipOpenFunctionForOverseasDemand 海外需求推荐
|
|
SysVipOpenFunctionForOverseasDemand int = 1 << 5
|
|
)
|
|
|
|
// SysVipStatus 会员状态
|
|
type SysVipStatus int
|
|
|
|
func (m *SysVip) TableName() string {
|
|
return "sys_vip"
|
|
}
|
|
|
|
func (m *SysVip) GetFunctions() map[int]string {
|
|
return map[int]string{
|
|
SysVipOpenFunctionForSearch: "任意检索",
|
|
SysVipOpenFunctionForAchievementPush: "创新科技资源自动匹配推送功能",
|
|
SysVipOpenFunctionForHighCompanyDemand: "上市公司及优质客户的企业需求优先推送",
|
|
SysVipOpenFunctionForOrdinaryCompanyDemand: "普通企业的需求匹配推送",
|
|
SysVipOpenFunctionForMachImport: "匹配结果文件导出",
|
|
SysVipOpenFunctionForOverseasDemand: "海外需求推荐",
|
|
}
|
|
}
|
|
|
|
func NewSysVip() *SysVip {
|
|
return &SysVip{}
|
|
}
|