package yb_price_driven_visit_log

import "time"

// YbPriceDrivenVisitLog 研报-价格驱动访问记录表
type YbPriceDrivenVisitLog struct {
	ID             int       `gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null" json:"-"`
	PriceDrivenID  int       `gorm:"index:idx_price_driven_id;column:price_driven_id;type:int(10) unsigned;not null" json:"priceDrivenId"`        // 价格驱动ID
	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(100);not null;default:''" json:"varietyTagName"`                         // 标签名称
	UserID         int       `gorm:"index:idx_user_id;column:user_id;type:int(10) unsigned;not null;default:0" json:"userId"`                     // 用户ID
	Mobile         string    `gorm:"column:mobile;type:varchar(30);not null;default:''" json:"mobile"`                                            // 手机号
	RealName       string    `gorm:"column:real_name;type:varchar(100);not null;default:''" json:"realName"`                                      // 真实姓名
	NickName       string    `gorm:"column:nick_name;type:varchar(100);not null;default:''" json:"nickName"`                                      // 昵称
	CompanyID      int       `gorm:"column:company_id;type:int(10) unsigned;not null;default:0" json:"companyId"`                                 // 客户ID
	CompanyName    string    `gorm:"column:company_name;type:varchar(100);not null;default:''" json:"companyName"`                                // 客户名称
	CompanyStatus  string    `gorm:"column:company_status;type:varchar(30);not null;default:''" json:"companyStatus"`                             // 客户状态
	SourceAgent    int       `gorm:"column:source_agent;type:tinyint(4) unsigned;not null;default:1" json:"sourceAgent"`                          // 来源：1-小程序 2-小程序 PC 3-弘则研究公众号 4-Web PC
	CreateTime     time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"`                                // 创建时间
}

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

// YbPriceDrivenVisitLogColumns get sql column name.获取数据库列名
var YbPriceDrivenVisitLogColumns = struct {
	ID             string
	PriceDrivenID  string
	VarietyTagID   string
	VarietyTagName string
	UserID         string
	Mobile         string
	RealName       string
	NickName       string
	CompanyID      string
	CompanyName    string
	CompanyStatus  string
	SourceAgent    string
	CreateTime     string
}{
	ID:             "id",
	PriceDrivenID:  "price_driven_id",
	VarietyTagID:   "variety_tag_id",
	VarietyTagName: "variety_tag_name",
	UserID:         "user_id",
	Mobile:         "mobile",
	RealName:       "real_name",
	NickName:       "nick_name",
	CompanyID:      "company_id",
	CompanyName:    "company_name",
	CompanyStatus:  "company_status",
	SourceAgent:    "source_agent",
	CreateTime:     "create_time",
}
