package variety_tag

import "time"

// VarietyTag 品种标签库
type VarietyTag struct {
	VarietyTagID                int       `gorm:"primaryKey;column:variety_tag_id;type:int(10) unsigned;not null" json:"-"`                                                   // 品种标签ID
	VarietyClassifyID           int       `gorm:"index:idx_variety_classify_id;column:variety_classify_id;type:int(10) unsigned;not null;default:0" json:"varietyClassifyId"` // 分类ID
	VarietyClassifyName         string    `gorm:"column:variety_classify_name;type:varchar(100);not null;default:''" json:"varietyClassifyName"`                              // 品种分类名称
	TagName                     string    `gorm:"column:tag_name;type:varchar(100);not null;default:''" json:"tagName"`                                                       // 标签名
	ChartPermissionClassifyName string    `gorm:"column:chart_permission_classify_name;type:varchar(100);not null;default:''" json:"chartPermissionClassifyName"`             // 品种权限分类名
	ChartPermissionID           int       `gorm:"index:idx_chart_permission_id;column:chart_permission_id;type:int(10) unsigned;not null;default:0" json:"chartPermissionId"` // 品种权限ID
	ChartPermissionName         string    `gorm:"column:chart_permission_name;type:varchar(100);not null;default:''" json:"chartPermissionName"`                              // 品种权限名称
	Sort                        int       `gorm:"column:sort;type:int(10) unsigned;not null;default:0" json:"sort"`                                                           // 排序
	State                       int       `gorm:"column:state;type:tinyint(4) unsigned;not null;default:1" json:"state"`                                                      // 状态：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 *VarietyTag) TableName() string {
	return "variety_tag"
}

// VarietyTagColumns get sql column name.获取数据库列名
var VarietyTagColumns = struct {
	VarietyTagID                string
	VarietyClassifyID           string
	VarietyClassifyName         string
	TagName                     string
	ChartPermissionClassifyName string
	ChartPermissionID           string
	ChartPermissionName         string
	Sort                        string
	State                       string
	CreateTime                  string
	ModifyTime                  string
}{
	VarietyTagID:                "variety_tag_id",
	VarietyClassifyID:           "variety_classify_id",
	VarietyClassifyName:         "variety_classify_name",
	TagName:                     "tag_name",
	ChartPermissionClassifyName: "chart_permission_classify_name",
	ChartPermissionID:           "chart_permission_id",
	ChartPermissionName:         "chart_permission_name",
	Sort:                        "sort",
	State:                       "state",
	CreateTime:                  "create_time",
	ModifyTime:                  "modify_time",
}
