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

package models

const TableNameNewsDraft = "news_draft" //草稿箱

const (
	NEWS_DRAFT_COLUMN_ID           = "id"
	NEWS_DRAFT_COLUMN_NEWS_ID      = "news_id"
	NEWS_DRAFT_COLUMN_ORG_ID       = "org_id"
	NEWS_DRAFT_COLUMN_CATEGORY     = "category"
	NEWS_DRAFT_COLUMN_MAIN_TITLE   = "main_title"
	NEWS_DRAFT_COLUMN_SUB_TITLE    = "sub_title"
	NEWS_DRAFT_COLUMN_SUMMARY      = "summary"
	NEWS_DRAFT_COLUMN_KEYWORDS     = "keywords"
	NEWS_DRAFT_COLUMN_SEO_KEYWORDS = "seo_keywords"
	NEWS_DRAFT_COLUMN_TAGS         = "tags"
	NEWS_DRAFT_COLUMN_IMAGE_URL    = "image_url"
	NEWS_DRAFT_COLUMN_CONTENT      = "content"
	NEWS_DRAFT_COLUMN_LANGUAGE     = "language"
	NEWS_DRAFT_COLUMN_IS_DELETED   = "is_deleted"
	NEWS_DRAFT_COLUMN_IS_REPLICATE = "is_replicate"
	NEWS_DRAFT_COLUMN_CREATED_TIME = "created_time"
	NEWS_DRAFT_COLUMN_UPDATED_TIME = "updated_time"
	NEWS_DRAFT_COLUMN_EXTRA_DATA   = "extra_data"
)

type NewsDraftDO struct {
	Id          int64           `json:"id" db:"id" bson:"_id"`                                               //自增ID
	NewsId      int64           `json:"news_id" db:"news_id" bson:"news_id"`                                 //新闻ID(对应news表id字段)
	OrgId       int64           `json:"org_id" db:"org_id" bson:"org_id"`                                    //源新闻ID(对应news表org_id字段)
	Category    string          `json:"category" db:"category" bson:"category"`                              //分类
	MainTitle   string          `json:"main_title" db:"main_title" bson:"main_title"`                        //主标题
	SubTitle    string          `json:"sub_title" db:"sub_title" bson:"sub_title"`                           //副标题
	Summary     string          `json:"summary" db:"summary" sqlca:"isnull" bson:"summary"`                  //摘要
	Keywords    string          `json:"keywords" db:"keywords" sqlca:"isnull" bson:"keywords"`               //关键字(JSON数组)
	SeoKeywords string          `json:"seo_keywords" db:"seo_keywords" sqlca:"isnull" bson:"seo_keywords"`   //SEO关键字(JSON数组)
	Tags        []string        `json:"tags" db:"tags" sqlca:"isnull" bson:"tags"`                           //标签(JSON数组)
	ImageUrl    string          `json:"image_url" db:"image_url" sqlca:"isnull" bson:"image_url"`            //图片URL
	Content     string          `json:"content" db:"content" sqlca:"isnull" bson:"content"`                  //文章内容
	Language    LanguageType    `json:"language" db:"language" bson:"language"`                              //语言(zh-CN=中文 en=英文)
	IsDeleted   bool            `json:"is_deleted" db:"is_deleted" bson:"is_deleted"`                        //是否已删除(0=否 1=是)
	IsReplicate bool            `json:"is_replicate" db:"is_replicate" bson:"is_replicate"`                  //是否为副本(0=否 1=是)
	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"` //数据更新时间
	ExtraData   CommonExtraData `json:"extra_data" db:"extra_data" sqlca:"isnull" bson:"extra_data"`         //附带数据(JSON)
}

func (do *NewsDraftDO) GetId() int64                   { return do.Id }
func (do *NewsDraftDO) SetId(v int64)                  { do.Id = v }
func (do *NewsDraftDO) GetNewsId() int64               { return do.NewsId }
func (do *NewsDraftDO) SetNewsId(v int64)              { do.NewsId = v }
func (do *NewsDraftDO) GetOrgId() int64                { return do.OrgId }
func (do *NewsDraftDO) SetOrgId(v int64)               { do.OrgId = v }
func (do *NewsDraftDO) GetCategory() string            { return do.Category }
func (do *NewsDraftDO) SetCategory(v string)           { do.Category = v }
func (do *NewsDraftDO) GetMainTitle() string           { return do.MainTitle }
func (do *NewsDraftDO) SetMainTitle(v string)          { do.MainTitle = v }
func (do *NewsDraftDO) GetSubTitle() string            { return do.SubTitle }
func (do *NewsDraftDO) SetSubTitle(v string)           { do.SubTitle = v }
func (do *NewsDraftDO) GetSummary() string             { return do.Summary }
func (do *NewsDraftDO) SetSummary(v string)            { do.Summary = v }
func (do *NewsDraftDO) GetKeywords() string            { return do.Keywords }
func (do *NewsDraftDO) SetKeywords(v string)           { do.Keywords = v }
func (do *NewsDraftDO) GetSeoKeywords() string         { return do.SeoKeywords }
func (do *NewsDraftDO) SetSeoKeywords(v string)        { do.SeoKeywords = v }
func (do *NewsDraftDO) GetTags() []string              { return do.Tags }
func (do *NewsDraftDO) SetTags(v []string)             { do.Tags = v }
func (do *NewsDraftDO) GetImageUrl() string            { return do.ImageUrl }
func (do *NewsDraftDO) SetImageUrl(v string)           { do.ImageUrl = v }
func (do *NewsDraftDO) GetContent() string             { return do.Content }
func (do *NewsDraftDO) SetContent(v string)            { do.Content = v }
func (do *NewsDraftDO) GetLanguage() LanguageType      { return do.Language }
func (do *NewsDraftDO) SetLanguage(v LanguageType)     { do.Language = v }
func (do *NewsDraftDO) GetIsDeleted() bool             { return do.IsDeleted }
func (do *NewsDraftDO) SetIsDeleted(v bool)            { do.IsDeleted = v }
func (do *NewsDraftDO) GetIsReplicate() bool           { return do.IsReplicate }
func (do *NewsDraftDO) SetIsReplicate(v bool)          { do.IsReplicate = v }
func (do *NewsDraftDO) GetCreatedTime() string         { return do.CreatedTime }
func (do *NewsDraftDO) SetCreatedTime(v string)        { do.CreatedTime = v }
func (do *NewsDraftDO) GetUpdatedTime() string         { return do.UpdatedTime }
func (do *NewsDraftDO) SetUpdatedTime(v string)        { do.UpdatedTime = v }
func (do *NewsDraftDO) GetExtraData() CommonExtraData  { return do.ExtraData }
func (do *NewsDraftDO) SetExtraData(v CommonExtraData) { do.ExtraData = v }

/*
CREATE TABLE `news_draft` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `news_id` bigint NOT NULL DEFAULT '0' COMMENT '新闻ID(对应news表id字段)',
  `org_id` bigint NOT NULL DEFAULT '0' COMMENT '源新闻ID(对应news表org_id字段)',
  `category` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '分类',
  `main_title` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '主标题',
  `sub_title` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '副标题',
  `summary` text COLLATE utf8mb4_unicode_ci COMMENT '摘要',
  `keywords` text COLLATE utf8mb4_unicode_ci COMMENT '关键字(JSON数组)',
  `seo_keywords` text COLLATE utf8mb4_unicode_ci COMMENT 'SEO关键字(JSON数组)',
  `tags` json DEFAULT NULL COMMENT '标签(JSON数组)',
  `image_url` text COLLATE utf8mb4_unicode_ci COMMENT '图片URL',
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '文章内容',
  `language` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '语言(zh-CN=中文 en=英文)',
  `is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已删除(0=否 1=是)',
  `is_replicate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否为副本(0=否 1=是)',
  `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '数据创建时间',
  `updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '数据更新时间',
  `extra_data` json DEFAULT NULL COMMENT '附带数据(JSON)',
  PRIMARY KEY (`id`),
  KEY `INDEX_CREATED_TIME` (`created_time` DESC),
  KEY `INDEX_HOTSPOT` (`is_deleted`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='草稿箱';
*/
