package yb_price_driven

import (
	"time"
)

// YbPriceDriven 研报-价格驱动表
type YbPriceDriven struct {
	PriceDrivenID       int       `gorm:"primaryKey;column:price_driven_id;type:int(10) unsigned;not null" json:"-"`
	VarietyTagID        int       `gorm:"index:idx_variety_tag_id;column:variety_tag_id;type:int(10) unsigned;not null;default:0" json:"varietyTagId"` // 标签ID
	VarietyTagName      string    `gorm:"column:variety_tag_name;type:varchar(10);not null;default:''" json:"varietyTagName"`                          // 标签名称
	MainVariable        string    `gorm:"column:main_variable;type:varchar(255);not null;default:''" json:"mainVariable"`                              // 关键变量
	CoreDrivenType      int       `gorm:"column:core_driven_type;type:tinyint(4) unsigned;not null;default:0" json:"coreDrivenType"`                   // 核心驱动类型 0-多 1-空
	CoreDrivenContent   string    `gorm:"column:core_driven_content;type:varchar(255);not null;default:''" json:"coreDrivenContent"`                   // 核心驱动内容
	CoreContent         string    `gorm:"column:core_content;type:longtext" json:"coreContent"`                                                        // 核心内容
	LastUpdateAdminID   int       `gorm:"column:last_update_admin_id;type:int(10) unsigned;not null;default:0" json:"lastUpdateAdminId"`               // 最后一次更新人ID
	LastUpdateAdminName string    `gorm:"column:last_update_admin_name;type:varchar(30);not null;default:''" json:"lastUpdateAdminName"`               // 最后一次更新人姓名
	SendThsMsgTime      time.Time `gorm:"column:send_ths_msg_time;type:datetime" json:"sendThsMsgTime"`                                                // 最后一次推送客群消息的时间
	SendTemplateMsgTime time.Time `gorm:"column:send_template_msg_time;type:datetime" json:"sendTemplateMsgTime"`                                      // 最后一次推送模板消息的时间
	ThsMsgState         int       `gorm:"column:ths_msg_state;type:tinyint(4) unsigned;not null;default:0" json:"thsMsgState"`                         // 同花顺推送状态：0-未推送 1-已推送
	TemplateMsgState    int       `gorm:"column:template_msg_state;type:tinyint(4) unsigned;not null;default:0" json:"templateMsgState"`               // 模板消息推送状态：0-未推送 1-已推送
	PublishState        int       `gorm:"column:publish_state;type:tinyint(4) unsigned;not null;default:0" json:"publishState"`                        // 发布状态：0-未发布 1-已发布
	CreateTime          time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"`                                // 创建时间
	ModifyTime          time.Time `gorm:"column:modify_time;type:datetime;default:CURRENT_TIMESTAMP" json:"modifyTime"`                                // 修改时间
}

// TableName get sql table name.获取数据库表名
func (m *YbPriceDriven) TableName() string {
	return "yb_price_driven"
}

// YbPriceDrivenColumns get sql column name.获取数据库列名
var YbPriceDrivenColumns = struct {
	PriceDrivenID       string
	VarietyTagID        string
	VarietyTagName      string
	MainVariable        string
	CoreDrivenType      string
	CoreDrivenContent   string
	CoreContent         string
	LastUpdateAdminID   string
	LastUpdateAdminName string
	SendThsMsgTime      string
	SendTemplateMsgTime string
	ThsMsgState         string
	TemplateMsgState    string
	PublishState        string
	CreateTime          string
	ModifyTime          string
}{
	PriceDrivenID:       "price_driven_id",
	VarietyTagID:        "variety_tag_id",
	VarietyTagName:      "variety_tag_name",
	MainVariable:        "main_variable",
	CoreDrivenType:      "core_driven_type",
	CoreDrivenContent:   "core_driven_content",
	CoreContent:         "core_content",
	LastUpdateAdminID:   "last_update_admin_id",
	LastUpdateAdminName: "last_update_admin_name",
	SendThsMsgTime:      "send_ths_msg_time",
	SendTemplateMsgTime: "send_template_msg_time",
	ThsMsgState:         "ths_msg_state",
	TemplateMsgState:    "template_msg_state",
	PublishState:        "publish_state",
	CreateTime:          "create_time",
	ModifyTime:          "modify_time",
}
