package my_chart

import (
	"time"
)

// MyChart 我的图表
type MyChart struct {
	MyChartID   int       `gorm:"primaryKey;column:my_chart_id;type:int(11);not null" json:"-"`
	ChartInfoID int       `gorm:"column:chart_info_id;type:int(11)" json:"chartInfoId"`
	AdminID     int       `gorm:"column:admin_id;type:int(11)" json:"adminId"`
	CreateTime  time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`
	ModifyTime  time.Time `gorm:"column:modify_time;type:datetime" json:"modifyTime"`
}

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

// MyChartColumns get sql column name.获取数据库列名
var MyChartColumns = struct {
	MyChartID   string
	ChartInfoID string
	AdminID     string
	CreateTime  string
	ModifyTime  string
}{
	MyChartID:   "my_chart_id",
	ChartInfoID: "chart_info_id",
	AdminID:     "admin_id",
	CreateTime:  "create_time",
	ModifyTime:  "modify_time",
}