package company_user_chart_classify_permission

import (
	"time"
)

// CompanyUserChartClassifyPermission 客户联系人-图表分类权限表
type CompanyUserChartClassifyPermission struct {
	ID            uint32    `gorm:"primaryKey;column:id;type:int(10) unsigned;not null" json:"-"`                            // 主键ID
	UserID        uint32    `gorm:"index:idx_user_id;column:user_id;type:int(10) unsigned;not null;default:0" json:"userId"` // 用户ID
	ChartClassify string    `gorm:"column:chart_classify;type:varchar(255);not null;default:''" json:"chartClassify"`        // 图表分类权限-逗号分隔
	StartTime     time.Time `gorm:"column:start_time;type:datetime" json:"startTime"`                                        // 起始时间
	EndTime       time.Time `gorm:"column:end_time;type:datetime" json:"endTime"`                                            // 终止时间
	Enabled       uint8     `gorm:"column:enabled;type:tinyint(4) unsigned;not null;default:1" json:"enabled"`               // 使用状态 1-开启 0-关闭
	CreateTime    time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`                                      // 创建时间
	UpdateTime    time.Time `gorm:"column:update_time;type:datetime" json:"updateTime"`                                      // 更新时间
}

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

// CompanyUserChartClassifyPermissionColumns get sql column name.获取数据库列名
var CompanyUserChartClassifyPermissionColumns = struct {
	ID            string
	UserID        string
	ChartClassify string
	StartTime     string
	EndTime       string
	Enabled       string
	CreateTime    string
	UpdateTime    string
}{
	ID:            "id",
	UserID:        "user_id",
	ChartClassify: "chart_classify",
	StartTime:     "start_time",
	EndTime:       "end_time",
	Enabled:       "enabled",
	CreateTime:    "create_time",
	UpdateTime:    "update_time",
}

