// Code generated by db2go. DO NOT EDIT.
// https://github.com/civet148/sqlca

package models

const TableNameTemplate = "template" //

const (
	TEMPLATE_COLUMN_ID            = "id"
	TEMPLATE_COLUMN_TEMPLATE_TYPE = "template_type"
	TEMPLATE_COLUMN_SUBJECT       = "subject"
	TEMPLATE_COLUMN_CONTENT       = "content"
	TEMPLATE_COLUMN_LANGUAGE      = "language"
	TEMPLATE_COLUMN_EDITOR_USER   = "editor_user"
	TEMPLATE_COLUMN_CREATED_TIME  = "created_time"
	TEMPLATE_COLUMN_UPDATED_TIME  = "updated_time"
)

type TemplateDO struct {
	Id           int32        `json:"id" db:"id" bson:"_id"`                                               //自增ID
	TemplateType TemplateType `json:"template_type" db:"template_type" bson:"template_type"`               //模板类型(1=订阅欢迎邮件[英文] 2=订阅欢迎邮件[中午])
	Subject      string       `json:"subject" db:"subject" bson:"subject"`                                 //主题
	Content      string       `json:"content" db:"content" sqlca:"isnull" bson:"content"`                  //内容
	Language     string       `json:"language" db:"language" bson:"language"`                              //语言(英语=en 中文=zh-CN)
	EditorUser   string       `json:"editor_user" db:"editor_user" bson:"editor_user"`                     //最后编辑人
	CreatedTime  string       `json:"created_time" db:"created_time" sqlca:"readonly" bson:"created_time"` //创建时间
	UpdatedTime  string       `json:"updated_time" db:"updated_time" sqlca:"readonly" bson:"updated_time"` //更新时间
}

func (do *TemplateDO) GetId() int32                   { return do.Id }
func (do *TemplateDO) SetId(v int32)                  { do.Id = v }
func (do *TemplateDO) GetTemplateType() TemplateType  { return do.TemplateType }
func (do *TemplateDO) SetTemplateType(v TemplateType) { do.TemplateType = v }
func (do *TemplateDO) GetSubject() string             { return do.Subject }
func (do *TemplateDO) SetSubject(v string)            { do.Subject = v }
func (do *TemplateDO) GetContent() string             { return do.Content }
func (do *TemplateDO) SetContent(v string)            { do.Content = v }
func (do *TemplateDO) GetLanguage() string            { return do.Language }
func (do *TemplateDO) SetLanguage(v string)           { do.Language = v }
func (do *TemplateDO) GetEditorUser() string          { return do.EditorUser }
func (do *TemplateDO) SetEditorUser(v string)         { do.EditorUser = v }
func (do *TemplateDO) GetCreatedTime() string         { return do.CreatedTime }
func (do *TemplateDO) SetCreatedTime(v string)        { do.CreatedTime = v }
func (do *TemplateDO) GetUpdatedTime() string         { return do.UpdatedTime }
func (do *TemplateDO) SetUpdatedTime(v string)        { do.UpdatedTime = v }

/*
CREATE TABLE `template` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `template_type` int NOT NULL COMMENT '模板类型(1=订阅欢迎邮件[英文] 2=订阅欢迎邮件[中午])',
  `subject` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '主题',
  `content` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '内容',
  `language` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '语言(英语=en 中文=zh-CN)',
  `editor_user` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '最后编辑人',
  `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
*/
