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

package models

const TableNameQuestionAnswer = "question_answer" //

const (
	QUESTION_ANSWER_COLUMN_ID             = "id"
	QUESTION_ANSWER_COLUMN_ORG_ID         = "org_id"
	QUESTION_ANSWER_COLUMN_QUESTION       = "question"
	QUESTION_ANSWER_COLUMN_ANSWER         = "answer"
	QUESTION_ANSWER_COLUMN_STATE          = "state"
	QUESTION_ANSWER_COLUMN_LANGUAGE       = "language"
	QUESTION_ANSWER_COLUMN_IS_OVERWRITTEN = "is_overwritten"
	QUESTION_ANSWER_COLUMN_IS_REPLICATE   = "is_replicate"
	QUESTION_ANSWER_COLUMN_IS_DELETED     = "is_deleted"
	QUESTION_ANSWER_COLUMN_DATA_TIME      = "data_time"
	QUESTION_ANSWER_COLUMN_CREATED_TIME   = "created_time"
	QUESTION_ANSWER_COLUMN_UPDATED_TIME   = "updated_time"
	QUESTION_ANSWER_COLUMN_EXTRA_DATA     = "extra_data"
)

type QuestionAnswerDO struct {
	Id            int64           `json:"id" db:"id" bson:"_id"`                                               //自增ID
	OrgId         int64           `json:"org_id" db:"org_id" bson:"org_id"`                                    //Q&A源ID(同步ID)
	Question      string          `json:"question" db:"question" sqlca:"isnull" bson:"question"`               //问题
	Answer        string          `json:"answer" db:"answer" sqlca:"isnull" bson:"answer"`                     //答案
	State         QAState         `json:"state" db:"state" bson:"state"`                                       //是否已发布(0=草稿 1=已发布 2=已下架)
	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=已删除)
	DataTime      string          `json:"data_time" db:"data_time" bson:"data_time"`                           //数据生成时间
	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 *QuestionAnswerDO) GetId() int64                   { return do.Id }
func (do *QuestionAnswerDO) SetId(v int64)                  { do.Id = v }
func (do *QuestionAnswerDO) GetOrgId() int64                { return do.OrgId }
func (do *QuestionAnswerDO) SetOrgId(v int64)               { do.OrgId = v }
func (do *QuestionAnswerDO) GetQuestion() string            { return do.Question }
func (do *QuestionAnswerDO) SetQuestion(v string)           { do.Question = v }
func (do *QuestionAnswerDO) GetAnswer() string              { return do.Answer }
func (do *QuestionAnswerDO) SetAnswer(v string)             { do.Answer = v }
func (do *QuestionAnswerDO) GetState() QAState              { return do.State }
func (do *QuestionAnswerDO) SetState(v QAState)             { do.State = v }
func (do *QuestionAnswerDO) GetLanguage() LanguageType      { return do.Language }
func (do *QuestionAnswerDO) SetLanguage(v LanguageType)     { do.Language = v }
func (do *QuestionAnswerDO) GetIsOverwritten() bool         { return do.IsOverwritten }
func (do *QuestionAnswerDO) SetIsOverwritten(v bool)        { do.IsOverwritten = v }
func (do *QuestionAnswerDO) GetIsReplicate() bool           { return do.IsReplicate }
func (do *QuestionAnswerDO) SetIsReplicate(v bool)          { do.IsReplicate = v }
func (do *QuestionAnswerDO) GetIsDeleted() bool             { return do.IsDeleted }
func (do *QuestionAnswerDO) SetIsDeleted(v bool)            { do.IsDeleted = v }
func (do *QuestionAnswerDO) GetDataTime() string            { return do.DataTime }
func (do *QuestionAnswerDO) SetDataTime(v string)           { do.DataTime = v }
func (do *QuestionAnswerDO) GetCreatedTime() string         { return do.CreatedTime }
func (do *QuestionAnswerDO) SetCreatedTime(v string)        { do.CreatedTime = v }
func (do *QuestionAnswerDO) GetUpdatedTime() string         { return do.UpdatedTime }
func (do *QuestionAnswerDO) SetUpdatedTime(v string)        { do.UpdatedTime = v }
func (do *QuestionAnswerDO) GetExtraData() CommonExtraData  { return do.ExtraData }
func (do *QuestionAnswerDO) SetExtraData(v CommonExtraData) { do.ExtraData = v }

/*
CREATE TABLE `question_answer` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增ID',
  `org_id` bigint NOT NULL DEFAULT '0' COMMENT 'Q&A源ID(同步ID)',
  `question` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '问题',
  `answer` mediumtext COLLATE utf8mb4_unicode_ci COMMENT '答案',
  `state` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已发布(0=草稿 1=已发布 2=已下架)',
  `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=已删除)',
  `data_time` timestamp NOT NULL COMMENT '数据生成时间',
  `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 AUTO_INCREMENT=1454 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
*/
