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

package models

const TableNameNewsSubscribe = "news_subscribe" //

const (
	NEWS_SUBSCRIBE_COLUMN_ID           = "id"
	NEWS_SUBSCRIBE_COLUMN_NEWS_ID      = "news_id"
	NEWS_SUBSCRIBE_COLUMN_NEWS_SUBJECT = "news_subject"
	NEWS_SUBSCRIBE_COLUMN_NEWS_URL     = "news_url"
	NEWS_SUBSCRIBE_COLUMN_IS_PUSHED    = "is_pushed"
	NEWS_SUBSCRIBE_COLUMN_IS_DELETED   = "is_deleted"
	NEWS_SUBSCRIBE_COLUMN_CREATED_TIME = "created_time"
	NEWS_SUBSCRIBE_COLUMN_UPDATED_TIME = "updated_time"
	NEWS_SUBSCRIBE_COLUMN_EXTRA_DATA   = "extra_data"
)

type NewsSubscribeDO struct {
	Id          int64    `json:"id" db:"id" bson:"_id"`                                               //自增ID
	NewsId      int64    `json:"news_id" db:"news_id" bson:"news_id"`                                 //订阅推送新闻ID(对应news表id字段)
	NewsSubject string   `json:"news_subject" db:"news_subject" bson:"news_subject"`                  //邮件主题
	NewsUrl     string   `json:"news_url" db:"news_url" bson:"news_url"`                              //订阅新闻推送URL
	IsPushed    bool     `json:"is_pushed" db:"is_pushed" bson:"is_pushed"`                           //是否已推送(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 *NewsSubscribeDO) GetId() int64            { return do.Id }
func (do *NewsSubscribeDO) SetId(v int64)           { do.Id = v }
func (do *NewsSubscribeDO) GetNewsId() int64        { return do.NewsId }
func (do *NewsSubscribeDO) SetNewsId(v int64)       { do.NewsId = v }
func (do *NewsSubscribeDO) GetNewsSubject() string  { return do.NewsSubject }
func (do *NewsSubscribeDO) SetNewsSubject(v string) { do.NewsSubject = v }
func (do *NewsSubscribeDO) GetNewsUrl() string      { return do.NewsUrl }
func (do *NewsSubscribeDO) SetNewsUrl(v string)     { do.NewsUrl = v }
func (do *NewsSubscribeDO) GetIsPushed() bool       { return do.IsPushed }
func (do *NewsSubscribeDO) SetIsPushed(v bool)      { do.IsPushed = v }
func (do *NewsSubscribeDO) GetIsDeleted() bool      { return do.IsDeleted }
func (do *NewsSubscribeDO) SetIsDeleted(v bool)     { do.IsDeleted = v }
func (do *NewsSubscribeDO) GetCreatedTime() string  { return do.CreatedTime }
func (do *NewsSubscribeDO) SetCreatedTime(v string) { do.CreatedTime = v }
func (do *NewsSubscribeDO) GetUpdatedTime() string  { return do.UpdatedTime }
func (do *NewsSubscribeDO) SetUpdatedTime(v string) { do.UpdatedTime = v }
func (do *NewsSubscribeDO) GetExtraData() struct{}  { return do.ExtraData }
func (do *NewsSubscribeDO) SetExtraData(v struct{}) { do.ExtraData = v }

/*
CREATE TABLE `news_subscribe` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `news_id` bigint NOT NULL COMMENT '订阅推送新闻ID(对应news表id字段)',
  `news_subject` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '邮件主题',
  `news_url` varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '订阅新闻推送URL',
  `is_pushed` 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_NEWS_ID` (`news_id`,`is_deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
*/
