plugai_updsrv/pkg/dal/models/news_spider_do.go

111 lines
7.2 KiB
Go

// Code generated by db2go. DO NOT EDIT.
// https://github.com/civet148/sqlca
package models
const TableNameNewsSpider = "news_spider" //新闻文章数据表(爬虫)
const (
NEWS_SPIDER_COLUMN_ID = "id"
NEWS_SPIDER_COLUMN_ORG_ID = "org_id"
NEWS_SPIDER_COLUMN_TAG = "tag"
NEWS_SPIDER_COLUMN_CATEGORY = "category"
NEWS_SPIDER_COLUMN_MAIN_TITLE = "main_title"
NEWS_SPIDER_COLUMN_SUB_TITLE = "sub_title"
NEWS_SPIDER_COLUMN_SUMMARY = "summary"
NEWS_SPIDER_COLUMN_KEYWORDS = "keywords"
NEWS_SPIDER_COLUMN_SEO_KEYWORDS = "seo_keywords"
NEWS_SPIDER_COLUMN_URL = "url"
NEWS_SPIDER_COLUMN_IMAGE_URL = "image_url"
NEWS_SPIDER_COLUMN_CONTENT = "content"
NEWS_SPIDER_COLUMN_IS_HOTSPOT = "is_hotspot"
NEWS_SPIDER_COLUMN_IS_DELETED = "is_deleted"
NEWS_SPIDER_COLUMN_CREATED_TIME = "created_time"
NEWS_SPIDER_COLUMN_UPDATED_TIME = "updated_time"
NEWS_SPIDER_COLUMN_EXTRA_DATA = "extra_data"
)
type NewsSpiderDO struct {
Id int64 `json:"id" db:"id" bson:"_id"` //自增ID
OrgId int64 `json:"org_id" db:"org_id" bson:"org_id"` //新闻同步ID
Tag string `json:"tag" db:"tag" bson:"tag"` //文章标签
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"` //文章关键词
SeoKeywords string `json:"seo_keywords" db:"seo_keywords" sqlca:"isnull" bson:"seo_keywords"` //SEO关键词
Url string `json:"url" db:"url" sqlca:"isnull" bson:"url"` //文章链接
ImageUrl string `json:"image_url" db:"image_url" sqlca:"isnull" bson:"image_url"` //图片URL
Content string `json:"content" db:"content" sqlca:"isnull" bson:"content"` //文章内容
IsHotspot bool `json:"is_hotspot" db:"is_hotspot" bson:"is_hotspot"` //是否热门(0=否 1=是)
IsDeleted bool `json:"is_deleted" db:"is_deleted" bson:"is_deleted"` //是否已删除(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 struct{} `json:"extra_data" db:"extra_data" sqlca:"isnull" bson:"extra_data"` //附带数据(JSON)
}
func (do *NewsSpiderDO) GetId() int64 { return do.Id }
func (do *NewsSpiderDO) SetId(v int64) { do.Id = v }
func (do *NewsSpiderDO) GetOrgId() int64 { return do.OrgId }
func (do *NewsSpiderDO) SetOrgId(v int64) { do.OrgId = v }
func (do *NewsSpiderDO) GetTag() string { return do.Tag }
func (do *NewsSpiderDO) SetTag(v string) { do.Tag = v }
func (do *NewsSpiderDO) GetCategory() string { return do.Category }
func (do *NewsSpiderDO) SetCategory(v string) { do.Category = v }
func (do *NewsSpiderDO) GetMainTitle() string { return do.MainTitle }
func (do *NewsSpiderDO) SetMainTitle(v string) { do.MainTitle = v }
func (do *NewsSpiderDO) GetSubTitle() string { return do.SubTitle }
func (do *NewsSpiderDO) SetSubTitle(v string) { do.SubTitle = v }
func (do *NewsSpiderDO) GetSummary() string { return do.Summary }
func (do *NewsSpiderDO) SetSummary(v string) { do.Summary = v }
func (do *NewsSpiderDO) GetKeywords() string { return do.Keywords }
func (do *NewsSpiderDO) SetKeywords(v string) { do.Keywords = v }
func (do *NewsSpiderDO) GetSeoKeywords() string { return do.SeoKeywords }
func (do *NewsSpiderDO) SetSeoKeywords(v string) { do.SeoKeywords = v }
func (do *NewsSpiderDO) GetUrl() string { return do.Url }
func (do *NewsSpiderDO) SetUrl(v string) { do.Url = v }
func (do *NewsSpiderDO) GetImageUrl() string { return do.ImageUrl }
func (do *NewsSpiderDO) SetImageUrl(v string) { do.ImageUrl = v }
func (do *NewsSpiderDO) GetContent() string { return do.Content }
func (do *NewsSpiderDO) SetContent(v string) { do.Content = v }
func (do *NewsSpiderDO) GetIsHotspot() bool { return do.IsHotspot }
func (do *NewsSpiderDO) SetIsHotspot(v bool) { do.IsHotspot = v }
func (do *NewsSpiderDO) GetIsDeleted() bool { return do.IsDeleted }
func (do *NewsSpiderDO) SetIsDeleted(v bool) { do.IsDeleted = v }
func (do *NewsSpiderDO) GetCreatedTime() string { return do.CreatedTime }
func (do *NewsSpiderDO) SetCreatedTime(v string) { do.CreatedTime = v }
func (do *NewsSpiderDO) GetUpdatedTime() string { return do.UpdatedTime }
func (do *NewsSpiderDO) SetUpdatedTime(v string) { do.UpdatedTime = v }
func (do *NewsSpiderDO) GetExtraData() struct{} { return do.ExtraData }
func (do *NewsSpiderDO) SetExtraData(v struct{}) { do.ExtraData = v }
/*
CREATE TABLE `news_spider` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
`org_id` bigint NOT NULL DEFAULT '0' COMMENT '新闻同步ID',
`tag` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '文章标签',
`category` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '分类',
`main_title` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '主标题',
`sub_title` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '副标题',
`summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '摘要',
`keywords` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '文章关键词',
`seo_keywords` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'SEO关键词',
`url` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '文章链接',
`image_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '图片URL',
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '文章内容',
`is_hotspot` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否热门(0=否 1=是)',
`is_deleted` 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_MAIN_TITLE` (`main_title`),
KEY `INDEX_SUB_TITLE` (`sub_title`),
KEY `INDEX_CREATED_TIME` (`created_time` DESC),
KEY `INDEX_TAG` (`tag`),
KEY `INDEX_UPDATED_TIME` (`updated_time` DESC),
KEY `INDEX_NEWS_ID` (`org_id`)
) ENGINE=InnoDB AUTO_INCREMENT=196 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='新闻文章数据表(爬虫)';
*/