package yb_chart_daily_visit_log

import (
	"time"
)

// YbChartDailyVisitLog 图表每日访问记录表
type YbChartDailyVisitLog struct {
	Id                  int       `gorm:"primaryKey;column:id;type:bigint(20) unsigned;not null" json:"-"`
	CompanyId           int       `gorm:"index:idx_company_id;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"`                                        // 客户名称
	UserId              int       `gorm:"column:user_id;type:int(10) unsigned;not null;default:0" json:"userId"`                                               // 用户ID
	RealName            string    `gorm:"column:real_name;type:varchar(100);not null;default:''" json:"realName"`                                              // 用户名称
	Mobile              string    `gorm:"column:mobile;type:varchar(32);not null;default:''" json:"mobile"`                                                    // 用户手机号
	Email               string    `gorm:"column:email;type:varchar(100);not null;default:''" json:"email"`                                                     // 电子邮箱
	ChartInfoId         int       `gorm:"index:idx_chart_info_id;column:chart_info_id;type:int(10) unsigned;not null;default:0" json:"chartInfoId"`            // 图表ID
	ChartName           string    `gorm:"column:chart_name;type:varchar(150);not null;default:''" json:"chartName"`                                            // 图表名称
	MyChartClassifyId   int       `gorm:"index:idx_classify_id;column:my_chart_classify_id;type:int(10) unsigned;not null;default:0" json:"myChartClassifyId"` // 图表分类ID
	MyChartClassifyName string    `gorm:"column:my_chart_classify_name;type:varchar(100);not null;default:''" json:"myChartClassifyName"`                      // 图表分类名称
	CreateTime          time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`                                                                  // 访问时间
}

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

// YbChartDailyVisitLogColumns get sql column name.获取数据库列名
var YbChartDailyVisitLogColumns = struct {
	Id                  string
	CompanyId           string
	CompanyName         string
	UserId              string
	Mobile              string
	Email               string
	ChartInfoId         string
	ChartName           string
	MyChartClassifyId   string
	MyChartClassifyName string
	CreateTime          string
}{
	Id:                  "id",
	CompanyId:           "company_id",
	CompanyName:         "company_name",
	UserId:              "user_id",
	Mobile:              "mobile",
	Email:               "email",
	ChartInfoId:         "chart_info_id",
	ChartName:           "chart_name",
	MyChartClassifyId:   "my_chart_classify_id",
	MyChartClassifyName: "my_chart_classify_name",
	CreateTime:          "create_time",
}
