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

package models

const TableNameQuestionDraft = "question_draft" //

const (
	QUESTION_DRAFT_COLUMN_ID             = "id"
	QUESTION_DRAFT_COLUMN_QA_ID          = "qa_id"
	QUESTION_DRAFT_COLUMN_ORG_ID         = "org_id"
	QUESTION_DRAFT_COLUMN_QUESTION       = "question"
	QUESTION_DRAFT_COLUMN_ANSWER         = "answer"
	QUESTION_DRAFT_COLUMN_LANGUAGE       = "language"
	QUESTION_DRAFT_COLUMN_IS_OVERWRITTEN = "is_overwritten"
	QUESTION_DRAFT_COLUMN_IS_REPLICATE   = "is_replicate"
	QUESTION_DRAFT_COLUMN_IS_DELETED     = "is_deleted"
	QUESTION_DRAFT_COLUMN_CREATED_TIME   = "created_time"
	QUESTION_DRAFT_COLUMN_UPDATED_TIME   = "updated_time"
	QUESTION_DRAFT_COLUMN_EXTRA_DATA     = "extra_data"
)

type QuestionDraftDO struct {
	Id            int64           `json:"id" db:"id" bson:"_id"`                                               //自增ID
	QaId          int64           `json:"qa_id" db:"qa_id" bson:"qa_id"`                                       //源ID(对应question_answer表id字段)
	OrgId         int64           `json:"org_id" db:"org_id" bson:"org_id"`                                    //Q&A同步ID
	Question      string          `json:"question" db:"question" bson:"question"`                              //问题
	Answer        string          `json:"answer" db:"answer" sqlca:"isnull" bson:"answer"`                     //答案
	Language      LanguageType    `json:"language" db:"language" bson:"language"`                              //语言(zh-CN=中文 en=英文)
	IsOverwritten bool            `json:"is_overwritten" db:"is_overwritten" bson:"is_overwritten"`            //是否已被覆盖(0=否 1=是)
	IsReplicate   bool            `json:"is_replicate" db:"is_replicate" bson:"is_replicate"`                  //是否为副本(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     CommonExtraData `json:"extra_data" db:"extra_data" sqlca:"isnull" bson:"extra_data"`         //附带数据(JSON)
}

func (do *QuestionDraftDO) GetId() int64                   { return do.Id }
func (do *QuestionDraftDO) SetId(v int64)                  { do.Id = v }
func (do *QuestionDraftDO) GetQaId() int64                 { return do.QaId }
func (do *QuestionDraftDO) SetQaId(v int64)                { do.QaId = v }
func (do *QuestionDraftDO) GetOrgId() int64                { return do.OrgId }
func (do *QuestionDraftDO) SetOrgId(v int64)               { do.OrgId = v }
func (do *QuestionDraftDO) GetQuestion() string            { return do.Question }
func (do *QuestionDraftDO) SetQuestion(v string)           { do.Question = v }
func (do *QuestionDraftDO) GetAnswer() string              { return do.Answer }
func (do *QuestionDraftDO) SetAnswer(v string)             { do.Answer = v }
func (do *QuestionDraftDO) GetLanguage() LanguageType      { return do.Language }
func (do *QuestionDraftDO) SetLanguage(v LanguageType)     { do.Language = v }
func (do *QuestionDraftDO) GetIsOverwritten() bool         { return do.IsOverwritten }
func (do *QuestionDraftDO) SetIsOverwritten(v bool)        { do.IsOverwritten = v }
func (do *QuestionDraftDO) GetIsReplicate() bool           { return do.IsReplicate }
func (do *QuestionDraftDO) SetIsReplicate(v bool)          { do.IsReplicate = v }
func (do *QuestionDraftDO) GetIsDeleted() bool             { return do.IsDeleted }
func (do *QuestionDraftDO) SetIsDeleted(v bool)            { do.IsDeleted = v }
func (do *QuestionDraftDO) GetCreatedTime() string         { return do.CreatedTime }
func (do *QuestionDraftDO) SetCreatedTime(v string)        { do.CreatedTime = v }
func (do *QuestionDraftDO) GetUpdatedTime() string         { return do.UpdatedTime }
func (do *QuestionDraftDO) SetUpdatedTime(v string)        { do.UpdatedTime = v }
func (do *QuestionDraftDO) GetExtraData() CommonExtraData  { return do.ExtraData }
func (do *QuestionDraftDO) SetExtraData(v CommonExtraData) { do.ExtraData = v }

/*
CREATE TABLE `question_draft` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `qa_id` bigint NOT NULL DEFAULT '0' COMMENT '源ID(对应question_answer表id字段)',
  `org_id` bigint NOT NULL DEFAULT '0' COMMENT 'Q&A同步ID',
  `question` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '问题',
  `answer` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '答案',
  `language` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '语言(zh-CN=中文 en=英文)',
  `is_overwritten` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已被覆盖(0=否 1=是)',
  `is_replicate` 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 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_UPDATED_TIME` (`updated_time` DESC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
*/
