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

package models

const TableNameSubscriber = "subscriber" //

const (
	SUBSCRIBER_COLUMN_ID           = "id"
	SUBSCRIBER_COLUMN_CUSTOMER_ID  = "customer_id"
	SUBSCRIBER_COLUMN_EMAIL        = "email"
	SUBSCRIBER_COLUMN_TAGS         = "tags"
	SUBSCRIBER_COLUMN_IS_DELETED   = "is_deleted"
	SUBSCRIBER_COLUMN_CREATED_TIME = "created_time"
	SUBSCRIBER_COLUMN_UPDATED_TIME = "updated_time"
	SUBSCRIBER_COLUMN_EXTRA_DATA   = "extra_data"
)

type SubscriberDO struct {
	Id          int64               `json:"id" db:"id" bson:"_id"`                                               //自增ID
	CustomerId  int32               `json:"customer_id" db:"customer_id" bson:"customer_id"`                     //订阅者ID(对应customer标id字段，可为空)
	Email       string              `json:"email" db:"email" bson:"email"`                                       //订阅者邮箱
	Tags        []string            `json:"tags" db:"tags" bson:"tags"`                                          //订阅标签(主题)
	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   SubscriberExtraData `json:"extra_data" db:"extra_data" sqlca:"isnull" bson:"extra_data"`         //附带数据(JSON)
}

func (do *SubscriberDO) GetId() int64                       { return do.Id }
func (do *SubscriberDO) SetId(v int64)                      { do.Id = v }
func (do *SubscriberDO) GetCustomerId() int32               { return do.CustomerId }
func (do *SubscriberDO) SetCustomerId(v int32)              { do.CustomerId = v }
func (do *SubscriberDO) GetEmail() string                   { return do.Email }
func (do *SubscriberDO) SetEmail(v string)                  { do.Email = v }
func (do *SubscriberDO) GetTags() []string                  { return do.Tags }
func (do *SubscriberDO) SetTags(v []string)                 { do.Tags = v }
func (do *SubscriberDO) GetIsDeleted() bool                 { return do.IsDeleted }
func (do *SubscriberDO) SetIsDeleted(v bool)                { do.IsDeleted = v }
func (do *SubscriberDO) GetCreatedTime() string             { return do.CreatedTime }
func (do *SubscriberDO) SetCreatedTime(v string)            { do.CreatedTime = v }
func (do *SubscriberDO) GetUpdatedTime() string             { return do.UpdatedTime }
func (do *SubscriberDO) SetUpdatedTime(v string)            { do.UpdatedTime = v }
func (do *SubscriberDO) GetExtraData() SubscriberExtraData  { return do.ExtraData }
func (do *SubscriberDO) SetExtraData(v SubscriberExtraData) { do.ExtraData = v }

/*
CREATE TABLE `subscriber` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `customer_id` int NOT NULL DEFAULT '0' COMMENT '订阅者ID(对应customer标id字段，可为空)',
  `email` varchar(256) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '订阅者邮箱',
  `tags` varchar(1024) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '订阅标签(主题)',
  `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`),
  UNIQUE KEY `UNIQ_CUSTOMER_EMAIL` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
*/
