{"modulePath":"github.com/apache/answer","version":"v1.7.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package entity\n\n## Constants\n\n```go\nconst (\n\tActivityAvailable = 0\n\tActivityCancelled = 1\n)\n```\n\n```go\nconst (\n\tAnswerSearchOrderByDefault = \"default\"\n\tAnswerSearchOrderByTime    = \"updated\"\n\tAnswerSearchOrderByVote    = \"vote\"\n\tAnswerSearchOrderByTimeAsc = \"created\"\n\n\tAnswerStatusAvailable = 1\n\tAnswerStatusDeleted   = 10\n\tAnswerStatusPending   = 11\n)\n```\n\n```go\nconst (\n\tIsBadgeNotDeleted = 0\n\tIsBadgeDeleted    = 1\n\n\tBadgeEmptyAwardKey = \"0\"\n)\n```\n\n```go\nconst (\n\tBadgeStatusActive   = 1\n\tBadgeStatusDeleted  = 10\n\tBadgeStatusInactive = 11\n\n\tBadgeLevelBronze BadgeLevel = 1\n\tBadgeLevelSilver BadgeLevel = 2\n\tBadgeLevelGold   BadgeLevel = 3\n\n\tBadgeSingleAward = 1\n\tBadgeMultiAward  = 2\n)\n```\n\n```go\nconst (\n\tCaptchaActionEmail            = \"email\"\n\tCaptchaActionPassword         = \"password\"\n\tCaptchaActionEditUserinfo     = \"edit_userinfo\"\n\tCaptchaActionQuestion         = \"question\"\n\tCaptchaActionAnswer           = \"answer\"\n\tCaptchaActionComment          = \"comment\"\n\tCaptchaActionEdit             = \"edit\"\n\tCaptchaActionInvitationAnswer = \"invitation_answer\"\n\tCaptchaActionSearch           = \"search\"\n\tCaptchaActionReport           = \"report\"\n\tCaptchaActionDelete           = \"delete\"\n\tCaptchaActionVote             = \"vote\"\n)\n```\n\n```go\nconst (\n\tCommentStatusAvailable = 1\n\tCommentStatusDeleted   = 10\n\tCommentStatusPending   = 11\n)\n```\n\n```go\nconst (\n\tFileRecordStatusAvailable = 1\n\tFileRecordStatusDeleted   = 10\n)\n```\n\n```go\nconst (\n\tQuestionEditSummaryKey = \"question.edit.summary\"\n\tQuestionCloseReasonKey = \"question.close.reason\"\n\tAnswerEditSummaryKey   = \"answer.edit.summary\"\n\tTagEditSummaryKey      = \"tag.edit.summary\"\n\tObjectReactSummaryKey  = \"object.react.summary\"\n)\n```\n\n```go\nconst (\n\tQuestionStatusAvailable = 1\n\tQuestionStatusClosed    = 2\n\tQuestionStatusDeleted   = 10\n\tQuestionStatusPending   = 11\n\tQuestionUnPin           = 1\n\tQuestionPin             = 2\n\tQuestionShow            = 1\n\tQuestionHide            = 2\n)\n```\n\n```go\nconst (\n\tQuestionLinkStatusAvailable = 1\n\tQuestionLinkStatusDeleted   = 2\n)\n```\n\n```go\nconst (\n\tReportStatusPending   = 1\n\tReportStatusCompleted = 2\n\tReportStatusIgnore    = 3\n\tReportStatusDeleted   = 10\n)\n```\n\n```go\nconst (\n\tReviewStatusPending  = 1\n\tReviewStatusApproved = 2\n\tReviewStatusRejected = 3\n)\n```\n\n```go\nconst (\n\t// RevisionNormalStatus this revision is normal\n\tRevisionNormalStatus = 0\n\t// RevisionUnreviewedStatus this revision is unreviewed\n\tRevisionUnreviewedStatus = 1\n\t// RevisionReviewPassStatus this revision is reviewed and approved by operator\n\tRevisionReviewPassStatus = 2\n\t// RevisionReviewRejectStatus this revision is reviewed and rejected by operator\n\tRevisionReviewRejectStatus = 3\n)\n```\n\n```go\nconst (\n\tTagStatusAvailable = 1\n\tTagStatusDeleted   = 10\n)\n```\n\n```go\nconst (\n\tTagRelStatusAvailable = 1\n\tTagRelStatusHide      = 2\n\tTagRelStatusDeleted   = 10\n)\n```\n\n```go\nconst (\n\tUserStatusAvailable = 1\n\tUserStatusSuspended = 9\n\tUserStatusDeleted   = 10\n)\n```\n\n```go\nconst (\n\tEmailStatusAvailable    = 1\n\tEmailStatusToBeVerified = 2\n)\n```\n\n```go\nconst (\n\tUserAdminFlag = 1\n)\n```\n\n## Variables\n\n```go\nvar AdminAnswerSearchStatus = map[string]int{\n\t\"available\": AnswerStatusAvailable,\n\t\"deleted\":   AnswerStatusDeleted,\n\t\"pending\":   AnswerStatusPending,\n}\n```\n\n```go\nvar AdminQuestionSearchStatus = map[string]int{\n\t\"available\": QuestionStatusAvailable,\n\t\"closed\":    QuestionStatusClosed,\n\t\"deleted\":   QuestionStatusDeleted,\n\t\"pending\":   QuestionStatusPending,\n}\n```\n\n```go\nvar AdminQuestionSearchStatusIntToString = map[int]string{\n\tQuestionStatusAvailable: \"available\",\n\tQuestionStatusClosed:    \"closed\",\n\tQuestionStatusDeleted:   \"deleted\",\n\tQuestionStatusPending:   \"pending\",\n}\n```\n\n```go\nvar PermanentSuspensionTime = time.Date(2099, 12, 31, 23, 59, 59, 0, time.UTC)\n```\nPermanentSuspensionTime is a fixed time representing permanent suspension (2099-12-31 23:59:59)\n\n```go\nvar (\n\tReportStatus = map[string]int{\n\t\t\"pending\":   ReportStatusPending,\n\t\t\"completed\": ReportStatusCompleted,\n\t\t\"deleted\":   ReportStatusDeleted,\n\t}\n)\n```\n\n```go\nvar TagStatusDisplayMapping = map[int]string{\n\tTagStatusAvailable: \"available\",\n\tTagStatusDeleted:   \"deleted\",\n}\n```\n\n## Types\n\n```go\ntype ActionRecordInfo struct {\n\tLastTime int64  `json:\"last_time\"`\n\tNum      int    `json:\"num\"`\n\tConfig   string `json:\"config\"`\n}\n```\n\n```go\ntype Activity struct {\n\tID               string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt        time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt        time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tCancelledAt      time.Time `xorm:\"TIMESTAMP cancelled_at\"`\n\tUserID           string    `xorm:\"not null index BIGINT(20) user_id\"`\n\tTriggerUserID    int64     `xorm:\"not null default 0 index BIGINT(20) trigger_user_id\"`\n\tObjectID         string    `xorm:\"not null default 0 index BIGINT(20) object_id\"`\n\tOriginalObjectID string    `xorm:\"not null default 0 BIGINT(20) original_object_id\"`\n\tActivityType     int       `xorm:\"not null INT(11) activity_type\"`\n\tCancelled        int       `xorm:\"not null default 0 TINYINT(4) cancelled\"`\n\tRank             int       `xorm:\"not null default 0 INT(11) rank\"`\n\tHasRank          int       `xorm:\"not null default 0 TINYINT(4) has_rank\"`\n\tRevisionID       int64     `xorm:\"not null default 0 BIGINT(20) revision_id\"`\n}\n```\nActivity activity\n\n```go\nfunc (Activity) TableName() string\n```\nTableName activity table name\n\n```go\ntype ActivityRankSum struct {\n\tRank int `xorm:\"not null default 0 INT(11) rank\"`\n}\n```\n\n```go\ntype ActivityUserRankStat struct {\n\tUserID string `xorm:\"user_id\"`\n\tRank   int    `xorm:\"rank_amount\"`\n}\n```\n\n```go\ntype ActivityUserVoteStat struct {\n\tUserID    string `xorm:\"user_id\"`\n\tVoteCount int    `xorm:\"vote_count\"`\n}\n```\n\n```go\ntype Answer struct {\n\tID             string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt      time.Time `xorm:\"created not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt      time.Time `xorm:\"updated_at TIMESTAMP\"`\n\tQuestionID     string    `xorm:\"not null default 0 BIGINT(20) question_id\"`\n\tUserID         string    `xorm:\"not null default 0 BIGINT(20) INDEX user_id\"`\n\tLastEditUserID string    `xorm:\"not null default 0 BIGINT(20) last_edit_user_id\"`\n\tOriginalText   string    `xorm:\"not null MEDIUMTEXT original_text\"`\n\tParsedText     string    `xorm:\"not null MEDIUMTEXT parsed_text\"`\n\tStatus         int       `xorm:\"not null default 1 INT(11) status\"`\n\tAccepted       int       `xorm:\"not null default 1 INT(11) adopted\"`\n\tCommentCount   int       `xorm:\"not null default 0 INT(11) comment_count\"`\n\tVoteCount      int       `xorm:\"not null default 0 INT(11) vote_count\"`\n\tRevisionID     string    `xorm:\"not null default 0 BIGINT(20) revision_id\"`\n}\n```\nAnswer answer\n\n```go\nfunc (Answer) TableName() string\n```\nTableName answer table name\n\n```go\ntype AnswerSearch struct {\n\tAnswer\n\tIncludeDeleted bool   `json:\"include_deleted\"`\n\tLoginUserID    string `json:\"login_user_id\"`\n\tOrder          string `json:\"order_by\"`                   // default or updated\n\tPage           int    `json:\"page\" form:\"page\"`           // Query number of pages\n\tPageSize       int    `json:\"page_size\" form:\"page_size\"` // Search page size\n}\n```\n\n```go\ntype Badge struct {\n\tID           string     `xorm:\"not null pk BIGINT(20) id\"`\n\tCreatedAt    time.Time  `xorm:\"created not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt    time.Time  `xorm:\"updated not null default CURRENT_TIMESTAMP TIMESTAMP updated_at\"`\n\tName         string     `xorm:\"not null default '' VARCHAR(256) name\"`\n\tIcon         string     `xorm:\"not null default '' VARCHAR(1024) icon\"`\n\tAwardCount   int        `xorm:\"not null default 0 INT(11) award_count\"`\n\tDescription  string     `xorm:\"not null MEDIUMTEXT description\"`\n\tStatus       int8       `xorm:\"not null default 1 INT(11) status\"`\n\tBadgeGroupID int64      `xorm:\"not null default 0 BIGINT(20) badge_group_id\"`\n\tLevel        BadgeLevel `xorm:\"not null default 1 TINYINT(4) level\"`\n\tSingle       int8       `xorm:\"not null default 1 TINYINT(4) single\"`\n\tCollect      string     `xorm:\"not null default '' VARCHAR(128) collect\"`\n\tHandler      string     `xorm:\"not null default '' VARCHAR(128) handler\"`\n\tParam        string     `xorm:\"not null TEXT param\"`\n}\n```\nBadge badge\n\n```go\nfunc (b *Badge) GetIntParam(key string) int64\n```\n\n```go\nfunc (b *Badge) GetStringParam(key string) string\n```\n\n```go\nfunc (b *Badge) TableName() string\n```\nTableName badge table name\n\n```go\ntype BadgeAward struct {\n\tID             string    `xorm:\"not null pk BIGINT(20) id\"`\n\tCreatedAt      time.Time `xorm:\"created not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt      time.Time `xorm:\"updated not null default CURRENT_TIMESTAMP TIMESTAMP updated_at\"`\n\tUserID         string    `xorm:\"not null index BIGINT(20) user_id\"`\n\tBadgeID        string    `xorm:\"not null index BIGINT(20) badge_id\"`\n\tAwardKey       string    `xorm:\"not null index VARCHAR(64) award_key\"`\n\tBadgeGroupID   int64     `xorm:\"not null index BIGINT(20) badge_group_id\"`\n\tIsBadgeDeleted int8      `xorm:\"not null TINYINT(1) is_badge_deleted\"`\n}\n```\nBadgeAward badge\\_award\n\n```go\nfunc (BadgeAward) TableName() string\n```\nTableName badge\\_award table name\n\n```go\ntype BadgeAwardRecent struct {\n\tCreated        time.Time `xorm:\"created\"`\n\tBadgeID        string    `xorm:\"badge_id\"`\n\tAwardKey       string    `xorm:\"award_key\"`\n\tEarnedCount    int64     `xorm:\"earned_count\"`\n\tIsBadgeDeleted int8      `xorm:\"is_badge_deleted\"`\n}\n```\n\n```go\nfunc (BadgeAwardRecent) TableName() string\n```\nTableName badge\\_award table name\n\n```go\ntype BadgeEarnedCount struct {\n\tBadgeID     string `xorm:\"badge_id\"`\n\tEarnedCount int64  `xorm:\"earned_count\"`\n}\n```\n\n```go\nfunc (BadgeEarnedCount) TableName() string\n```\nTableName badge\\_award table name\n\n```go\ntype BadgeGroup struct {\n\tID        string    `json:\"id\" xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tName      string    `json:\"name\" xorm:\"not null default '' VARCHAR(256) name\"`\n\tCreatedAt time.Time `json:\"created_at\" xorm:\"created not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `json:\"updated_at\" xorm:\"updated not null default CURRENT_TIMESTAMP TIMESTAMP updated_at\"`\n}\n```\nBadgeGroup badge\\_group\n\n```go\nfunc (BadgeGroup) TableName() string\n```\nTableName badge\\_group table name\n\n```go\ntype BadgeLevel int\n```\n\n```go\ntype Collection struct {\n\tID                    string    `xorm:\"not null pk default 0 BIGINT(20) id\"`\n\tCreatedAt             time.Time `xorm:\"created not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt             time.Time `xorm:\"updated not null default CURRENT_TIMESTAMP TIMESTAMP updated_at\"`\n\tUserID                string    `xorm:\"not null default 0 BIGINT(20) INDEX user_id\"`\n\tObjectID              string    `xorm:\"not null default 0 BIGINT(20) object_id\"`\n\tUserCollectionGroupID string    `xorm:\"not null default 0 BIGINT(20) user_collection_group_id\"`\n}\n```\nCollection collection\n\n```go\nfunc (Collection) TableName() string\n```\nTableName collection table name\n\n```go\ntype CollectionGroup struct {\n\tID           string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt    time.Time `xorm:\"created not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt    time.Time `xorm:\"updated not null default CURRENT_TIMESTAMP TIMESTAMP updated_at\"`\n\tUserID       string    `xorm:\"not null default 0 BIGINT(20) INDEX user_id\"`\n\tName         string    `xorm:\"not null default '' VARCHAR(50) name\"`\n\tDefaultGroup int       `xorm:\"not null default 1 INT(11) default_group\"`\n}\n```\nCollectionGroup collection group\n\n```go\nfunc (CollectionGroup) TableName() string\n```\nTableName collection group table name\n\n```go\ntype CollectionSearch struct {\n\tCollection\n\tPage     int `json:\"page\" form:\"page\"`           // Query number of pages\n\tPageSize int `json:\"page_size\" form:\"page_size\"` // Search page size\n}\n```\n\n```go\ntype Comment struct {\n\tID             string        `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt      time.Time     `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt      time.Time     `xorm:\"updated TIMESTAMP updated_at\"`\n\tUserID         string        `xorm:\"not null default 0 BIGINT(20) user_id\"`\n\tReplyUserID    sql.NullInt64 `xorm:\"BIGINT(20) reply_user_id\"`\n\tReplyCommentID sql.NullInt64 `xorm:\"BIGINT(20) reply_comment_id\"`\n\tObjectID       string        `xorm:\"not null default 0 BIGINT(20) INDEX object_id\"`\n\tQuestionID     string        `xorm:\"not null default 0 BIGINT(20) question_id\"`\n\tVoteCount      int           `xorm:\"not null default 0 INT(11) vote_count\"`\n\tStatus         int           `xorm:\"not null default 0 TINYINT(4) status\"`\n\tOriginalText   string        `xorm:\"not null MEDIUMTEXT original_text\"`\n\tParsedText     string        `xorm:\"not null MEDIUMTEXT parsed_text\"`\n}\n```\nComment comment\n\n```go\nfunc (c *Comment) GetMentionUsernameList() []string\n```\nGetMentionUsernameList get mention username list\n\n```go\nfunc (c *Comment) GetReplyCommentID() string\n```\nGetReplyCommentID get reply comment id\n\n```go\nfunc (c *Comment) GetReplyUserID() string\n```\nGetReplyUserID get reply user id\n\n```go\nfunc (c *Comment) SetReplyCommentID(str string)\n```\nSetReplyCommentID set reply comment id\n\n```go\nfunc (c *Comment) SetReplyUserID(str string)\n```\nSetReplyUserID set reply user id\n\n```go\nfunc (c *Comment) TableName() string\n```\nTableName comment table name\n\n```go\ntype Config struct {\n\tID    int    `xorm:\"not null pk autoincr INT(11) id\"`\n\tKey   string `xorm:\"unique VARCHAR(128) key\"`\n\tValue string `xorm:\"TEXT value\"`\n}\n```\nConfig config\n\n```go\nfunc (c *Config) BuildByJSON(data []byte)\n```\n\n```go\nfunc (c *Config) GetArrayStringValue() []string\n```\nGetArrayStringValue get array string value\n\n```go\nfunc (c *Config) GetByteValue() []byte\n```\nGetByteValue get byte value\n\n```go\nfunc (c *Config) GetIntValue() int\n```\nGetIntValue get int value\n\n```go\nfunc (c *Config) JsonString() string\n```\n\n```go\nfunc (c *Config) TableName() string\n```\nTableName config table name\n\n```go\ntype FileRecord struct {\n\tID        int       `xorm:\"not null pk autoincr INT(10) id\"`\n\tCreatedAt time.Time `xorm:\"not null default CURRENT_TIMESTAMP created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"not null default CURRENT_TIMESTAMP updated TIMESTAMP updated_at\"`\n\tUserID    string    `xorm:\"not null default 0 BIGINT(20) user_id\"`\n\tFilePath  string    `xorm:\"not null VARCHAR(256) file_path\"`\n\tFileURL   string    `xorm:\"not null VARCHAR(1024) file_url\"`\n\tObjectID  string    `xorm:\"not null default 0 INDEX BIGINT(20) object_id\"`\n\tSource    string    `xorm:\"not null VARCHAR(128) source\"`\n\tStatus    int       `xorm:\"not null default 0 TINYINT(4) status\"`\n}\n```\nFileRecord file record\n\n```go\nfunc (FileRecord) TableName() string\n```\nTableName file record table name\n\n```go\ntype Meta struct {\n\tID        int       `xorm:\"not null pk autoincr INT(10) id\"`\n\tCreatedAt time.Time `xorm:\"not null default CURRENT_TIMESTAMP created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"not null default CURRENT_TIMESTAMP updated TIMESTAMP updated_at\"`\n\tObjectID  string    `xorm:\"not null default 0 INDEX BIGINT(20) object_id\"`\n\tKey       string    `xorm:\"not null VARCHAR(100) key\"`\n\tValue     string    `xorm:\"not null MEDIUMTEXT value\"`\n}\n```\nMeta meta\n\n```go\nfunc (Meta) TableName() string\n```\nTableName meta table name\n\n```go\ntype Notification struct {\n\tID        string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"TIMESTAMP updated_at\"`\n\tUserID    string    `xorm:\"not null default 0 BIGINT(20) INDEX user_id\"`\n\tObjectID  string    `xorm:\"not null default 0 INDEX BIGINT(20) object_id\"`\n\tContent   string    `xorm:\"not null TEXT content\"`\n\tType      int       `xorm:\"not null default 0 INT(11) type\"`\n\tMsgType   int       `xorm:\"not null default 0 INT(11) msg_type\"`\n\tIsRead    int       `xorm:\"not null default 1 INT(11) is_read\"`\n\tStatus    int       `xorm:\"not null default 1 INT(11) status\"`\n}\n```\nNotification notification\n\n```go\nfunc (Notification) TableName() string\n```\nTableName notification table name\n\n```go\ntype PersonalAnswerPageQueryCond struct {\n\tPage        int\n\tPageSize    int\n\tUserID      string\n\tOrder       string\n\tShowPending bool\n}\n```\n\n```go\ntype PluginConfig struct {\n\tID             int    `xorm:\"not null pk autoincr INT(11) id\"`\n\tPluginSlugName string `xorm:\"unique VARCHAR(128) plugin_slug_name\"`\n\tValue          string `xorm:\"TEXT value\"`\n}\n```\nPluginConfig plugin config\n\n```go\nfunc (PluginConfig) TableName() string\n```\nTableName config table name\n\n```go\ntype PluginKVStorage struct {\n\tID             int    `xorm:\"not null pk autoincr INT(11) id\"`\n\tPluginSlugName string `xorm:\"not null VARCHAR(128) UNIQUE(uk_psg) plugin_slug_name\"`\n\tGroup          string `xorm:\"not null VARCHAR(128) UNIQUE(uk_psg) 'group'\"`\n\tKey            string `xorm:\"not null VARCHAR(128) UNIQUE(uk_psg) 'key'\"`\n\tValue          string `xorm:\"not null TEXT value\"`\n}\n```\n\n```go\nfunc (PluginKVStorage) TableName() string\n```\n\n```go\ntype PluginUserConfig struct {\n\tID             int    `xorm:\"not null pk autoincr INT(11) id\"`\n\tUserID         string `xorm:\"not null default 0 BIGINT(20) UNIQUE(uk_up) user_id\"`\n\tPluginSlugName string `xorm:\"VARCHAR(128) UNIQUE(uk_up) plugin_slug_name\"`\n\tValue          string `xorm:\"TEXT value\"`\n}\n```\nPluginUserConfig plugin config\n\n```go\nfunc (PluginUserConfig) TableName() string\n```\nTableName config table name\n\n```go\ntype Power struct {\n\tID          int       `xorm:\"not null pk autoincr INT(11) id\"`\n\tCreatedAt   time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt   time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tName        string    `xorm:\"not null default '' VARCHAR(50) name\"`\n\tPowerType   string    `xorm:\"not null default '' VARCHAR(100) power_type\"`\n\tDescription string    `xorm:\"not null default '' VARCHAR(200) description\"`\n}\n```\nPower power\n\n```go\nfunc (Power) TableName() string\n```\nTableName power table name\n\n```go\ntype Question struct {\n\tID               string    `xorm:\"not null pk BIGINT(20) id\"`\n\tCreatedAt        time.Time `xorm:\"not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt        time.Time `xorm:\"updated_at TIMESTAMP\"`\n\tUserID           string    `xorm:\"not null default 0 BIGINT(20) INDEX user_id\"`\n\tInviteUserID     string    `xorm:\"TEXT invite_user_id\"`\n\tLastEditUserID   string    `xorm:\"not null default 0 BIGINT(20) last_edit_user_id\"`\n\tTitle            string    `xorm:\"not null default '' VARCHAR(150) title\"`\n\tOriginalText     string    `xorm:\"not null MEDIUMTEXT original_text\"`\n\tParsedText       string    `xorm:\"not null MEDIUMTEXT parsed_text\"`\n\tPin              int       `xorm:\"not null default 1 INT(11) pin\"`\n\tShow             int       `xorm:\"not null default 1 INT(11) show\"`\n\tStatus           int       `xorm:\"not null default 1 INT(11) status\"`\n\tViewCount        int       `xorm:\"not null default 0 INT(11) view_count\"`\n\tUniqueViewCount  int       `xorm:\"not null default 0 INT(11) unique_view_count\"`\n\tVoteCount        int       `xorm:\"not null default 0 INT(11) vote_count\"`\n\tAnswerCount      int       `xorm:\"not null default 0 INT(11) answer_count\"`\n\tHotScore         int       `xorm:\"not null default 0 INT(11) hot_score\"`\n\tCollectionCount  int       `xorm:\"not null default 0 INT(11) collection_count\"`\n\tFollowCount      int       `xorm:\"not null default 0 INT(11) follow_count\"`\n\tAcceptedAnswerID string    `xorm:\"not null default 0 BIGINT(20) accepted_answer_id\"`\n\tLastAnswerID     string    `xorm:\"not null default 0 BIGINT(20) last_answer_id\"`\n\tPostUpdateTime   time.Time `xorm:\"post_update_time TIMESTAMP\"`\n\tRevisionID       string    `xorm:\"not null default 0 BIGINT(20) revision_id\"`\n\tLinkedCount      int       `xorm:\"not null default 0 INT(11) linked_count\"`\n}\n```\nQuestion question\n\n```go\nfunc (Question) TableName() string\n```\nTableName question table name\n\n```go\ntype QuestionLink struct {\n\tID             string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt      time.Time `xorm:\"not null default CURRENT_TIMESTAMP TIMESTAMP created_at\"`\n\tUpdatedAt      time.Time `xorm:\"updated_at TIMESTAMP\"`\n\tFromQuestionID string    `xorm:\"not null default 0 BIGINT(20) index from_question_id\"`\n\tFromAnswerID   string    `xorm:\"BIGINT(20) from_answer_id\"`\n\tToQuestionID   string    `xorm:\"not null default 0 BIGINT(20) index to_question_id\"`\n\tToAnswerID     string    `xorm:\"BIGINT(20) to_answer_id\"`\n\tStatus         int       `xorm:\"not null default 1 INT(11) status\"`\n}\n```\n\n```go\nfunc (QuestionLink) TableName() string\n```\n\n```go\ntype QuestionWithTagsRevision struct {\n\tQuestion\n\tTags []*TagSimpleInfoForRevision `json:\"tags\"`\n}\n```\nQuestionWithTagsRevision question\n\n```go\ntype Report struct {\n\tID             string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt      time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt      time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tUserID         string    `xorm:\"not null BIGINT(20) user_id\"`\n\tObjectID       string    `xorm:\"not null BIGINT(20) object_id\"`\n\tReportedUserID string    `xorm:\"not null default 0 BIGINT(20) reported_user_id\"`\n\tObjectType     int       `xorm:\"not null default 0 INT(11) object_type\"`\n\tReportType     int       `xorm:\"not null default 0 INT(11) report_type\"`\n\tContent        string    `xorm:\"not null TEXT content\"`\n\tFlaggedType    int       `xorm:\"not null default 0 INT(11) flagged_type\"`\n\tFlaggedContent string    `xorm:\"TEXT flagged_content\"`\n\tStatus         int       `xorm:\"not null default 1 INT(11) status\"`\n}\n```\nReport report\n\n```go\nfunc (Report) TableName() string\n```\nTableName report table name\n\n```go\ntype Review struct {\n\tID             int       `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt      time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt      time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tUserID         string    `xorm:\"not null BIGINT(20) user_id\"`\n\tObjectID       string    `xorm:\"not null BIGINT(20) object_id\"`\n\tObjectType     int       `xorm:\"not null default 0 INT(11) object_type\"`\n\tReviewerUserID string    `xorm:\"not null default 0 BIGINT(20) reviewer_user_id\"`\n\tSubmitter      string    `xorm:\"not null default '' VARCHAR(100) submitter\"`\n\tReason         string    `xorm:\"not null TEXT reason\"`\n\tStatus         int       `xorm:\"not null default 0 INT(11) status\"`\n}\n```\nReview review\n\n```go\nfunc (Review) TableName() string\n```\nTableName review table name\n\n```go\ntype Revision struct {\n\tID           string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt    time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt    time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tUserID       string    `xorm:\"not null default 0 BIGINT(20) user_id\"`\n\tObjectType   int       `xorm:\"not null default 0 INT(11) object_type\"`\n\tObjectID     string    `xorm:\"not null default 0 BIGINT(20) INDEX object_id\"`\n\tTitle        string    `xorm:\"not null default '' VARCHAR(255) title\"`\n\tContent      string    `xorm:\"not null MEDIUMTEXT content\"`\n\tLog          string    `xorm:\"VARCHAR(255) log\"`\n\tStatus       int       `xorm:\"not null default 1 INT(11) status\"`\n\tReviewUserID int64     `xorm:\"not null default 0 BIGINT(20) review_user_id\"`\n}\n```\nRevision revision\n\n```go\nfunc (Revision) TableName() string\n```\nTableName revision table name\n\n```go\ntype Role struct {\n\tID          int       `xorm:\"not null pk autoincr INT(11) id\"`\n\tCreatedAt   time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt   time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tName        string    `xorm:\"not null default '' VARCHAR(50) name\"`\n\tDescription string    `xorm:\"not null default '' VARCHAR(200) description\"`\n}\n```\nRole role\n\n```go\nfunc (Role) TableName() string\n```\nTableName user table name\n\n```go\ntype RolePowerRel struct {\n\tID        int       `xorm:\"not null pk autoincr INT(11) id\"`\n\tCreatedAt time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tRoleID    int       `xorm:\"not null default 0 INT(11) role_id\"`\n\tPowerType string    `xorm:\"not null default '' VARCHAR(200) power_type\"`\n}\n```\nRolePowerRel role power rel\n\n```go\nfunc (RolePowerRel) TableName() string\n```\nTableName role power rel table name\n\n```go\ntype SiteInfo struct {\n\tID        string    `xorm:\"not null pk autoincr INT(11) id\"`\n\tCreatedAt time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tType      string    `xorm:\"not null VARCHAR(64) type\"`\n\tContent   string    `xorm:\"not null MEDIUMTEXT content\"`\n\tStatus    int       `xorm:\"not null default 1 INT(11) status\"`\n}\n```\nSiteInfo site information setting\n\n```go\nfunc (*SiteInfo) TableName() string\n```\nTableName table name\n\n```go\ntype Tag struct {\n\tID              string    `xorm:\"not null pk comment('tag_id') BIGINT(20) id\"`\n\tCreatedAt       time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt       time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tMainTagID       int64     `xorm:\"not null default 0 BIGINT(20) main_tag_id\"`\n\tMainTagSlugName string    `xorm:\"not null default '' VARCHAR(35) main_tag_slug_name\"`\n\tSlugName        string    `xorm:\"not null default '' unique VARCHAR(35) slug_name\"`\n\tDisplayName     string    `xorm:\"not null default '' VARCHAR(35) display_name\"`\n\tOriginalText    string    `xorm:\"not null MEDIUMTEXT original_text\"`\n\tParsedText      string    `xorm:\"not null MEDIUMTEXT parsed_text\"`\n\tFollowCount     int       `xorm:\"not null default 0 INT(11) follow_count\"`\n\tQuestionCount   int       `xorm:\"not null default 0 INT(11) question_count\"`\n\tStatus          int       `xorm:\"not null default 1 INT(11) status\"`\n\tRecommend       bool      `xorm:\"not null default false BOOL recommend\"`\n\tReserved        bool      `xorm:\"not null default false BOOL reserved\"`\n\tRevisionID      string    `xorm:\"not null default 0 BIGINT(20) revision_id\"`\n\tUserID          string    `xorm:\"not null default 0 BIGINT(20) user_id\"`\n}\n```\nTag tag\n\n```go\nfunc (Tag) TableName() string\n```\nTableName tag table name\n\n```go\ntype TagRel struct {\n\tID        int64     `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tObjectID  string    `xorm:\"not null INDEX UNIQUE(s) BIGINT(20) object_id\"`\n\tTagID     string    `xorm:\"not null INDEX UNIQUE(s) BIGINT(20) tag_id\"`\n\tStatus    int       `xorm:\"not null default 1 INT(11) status\"`\n}\n```\nTagRel tag relation\n\n```go\nfunc (TagRel) TableName() string\n```\nTableName tag list table name\n\n```go\ntype TagSimpleInfoForRevision struct {\n\tID              string `xorm:\"not null pk comment('tag_id') BIGINT(20) id\"`\n\tMainTagID       int64  `xorm:\"not null default 0 BIGINT(20) main_tag_id\"`\n\tMainTagSlugName string `xorm:\"not null default '' VARCHAR(35) main_tag_slug_name\"`\n\tSlugName        string `xorm:\"not null default '' unique VARCHAR(35) slug_name\"`\n\tDisplayName     string `xorm:\"not null default '' VARCHAR(35) display_name\"`\n\tRecommend       bool   `xorm:\"not null default false BOOL recommend\"`\n\tReserved        bool   `xorm:\"not null default false BOOL reserved\"`\n\tRevisionID      string `xorm:\"not null default 0 BIGINT(20) revision_id\"`\n}\n```\nTagSimpleInfoForRevision tag simple info for revision\n\n```go\ntype Uniqid struct {\n\tID         int64 `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tUniqidType int   `xorm:\"not null default 0 INT(11) uniqid_type\"`\n}\n```\nUniqid uniqid\n\n```go\nfunc (Uniqid) TableName() string\n```\nTableName uniqid table name\n\n```go\ntype User struct {\n\tID             string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt      time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt      time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tSuspendedAt    time.Time `xorm:\"TIMESTAMP suspended_at\"`\n\tSuspendedUntil time.Time `xorm:\"DATETIME suspended_until\"`\n\tDeletedAt      time.Time `xorm:\"TIMESTAMP deleted_at\"`\n\tLastLoginDate  time.Time `xorm:\"TIMESTAMP last_login_date\"`\n\tUsername       string    `xorm:\"not null default '' VARCHAR(50) UNIQUE username\"`\n\tPass           string    `xorm:\"not null default '' VARCHAR(255) pass\"`\n\tEMail          string    `xorm:\"not null VARCHAR(100) e_mail\"`\n\tMailStatus     int       `xorm:\"not null default 2 TINYINT(4) mail_status\"`\n\tNoticeStatus   int       `xorm:\"not null default 2 INT(11) notice_status\"`\n\tFollowCount    int       `xorm:\"not null default 0 INT(11) follow_count\"`\n\tAnswerCount    int       `xorm:\"not null default 0 INT(11) answer_count\"`\n\tQuestionCount  int       `xorm:\"not null default 0 INT(11) question_count\"`\n\tRank           int       `xorm:\"not null default 0 INT(11) rank\"`\n\tStatus         int       `xorm:\"not null default 1 INT(11) status\"`\n\tAuthorityGroup int       `xorm:\"not null default 1 INT(11) authority_group\"`\n\tDisplayName    string    `xorm:\"not null default '' VARCHAR(30) display_name\"`\n\tAvatar         string    `xorm:\"not null default '' VARCHAR(1024) avatar\"`\n\tMobile         string    `xorm:\"not null VARCHAR(20) mobile\"`\n\tBio            string    `xorm:\"not null TEXT bio\"`\n\tBioHTML        string    `xorm:\"not null TEXT bio_html\"`\n\tWebsite        string    `xorm:\"not null default '' VARCHAR(255) website\"`\n\tLocation       string    `xorm:\"not null default '' VARCHAR(100) location\"`\n\tIPInfo         string    `xorm:\"not null default '' VARCHAR(255) ip_info\"`\n\tIsAdmin        bool      `xorm:\"not null default false BOOL is_admin\"`\n\tLanguage       string    `xorm:\"not null default '' VARCHAR(100) language\"`\n\tColorScheme    string    `xorm:\"not null default '' VARCHAR(100) color_scheme\"`\n}\n```\nUser user\n\n```go\nfunc (User) TableName() string\n```\nTableName user table name\n\n```go\ntype UserCacheInfo struct {\n\tUserID      string `json:\"user_id\"`\n\tUserStatus  int    `json:\"user_status\"`\n\tEmailStatus int    `json:\"email_status\"`\n\tRoleID      int    `json:\"role_id\"`\n\tExternalID  string `json:\"external_id\"`\n\tVisitToken  string `json:\"visit_token\"`\n}\n```\nUserCacheInfo User Cache Information\n\n```go\ntype UserExternalLogin struct {\n\tID         int64     `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt  time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt  time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tUserID     string    `xorm:\"not null default 0 BIGINT(20) user_id\"`\n\tProvider   string    `xorm:\"not null default '' VARCHAR(100) provider\"`\n\tExternalID string    `xorm:\"not null default '' VARCHAR(128) external_id\"`\n\tMetaInfo   string    `xorm:\"TEXT meta_info\"`\n}\n```\nUserExternalLogin user external login\n\n```go\nfunc (UserExternalLogin) TableName() string\n```\nTableName  table name\n\n```go\ntype UserNotificationConfig struct {\n\tID        string    `xorm:\"not null pk autoincr BIGINT(20) id\"`\n\tCreatedAt time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tUserID    string    `xorm:\"not null default 0 INDEX UNIQUE(uk_us) BIGINT(20) INDEX user_id\"`\n\tSource    string    `xorm:\"not null default '' INDEX UNIQUE(uk_us) VARCHAR(64) source\"`\n\tChannels  string    `xorm:\"not null TEXT channels\"`\n\tEnabled   bool      `xorm:\"not null default false BOOL enabled\"`\n}\n```\nUserNotificationConfig user notification config\n\n```go\nfunc (UserNotificationConfig) TableName() string\n```\nTableName notification table name\n\n```go\ntype UserRoleRel struct {\n\tID        int       `xorm:\"not null pk autoincr INT(11) id\"`\n\tCreatedAt time.Time `xorm:\"created TIMESTAMP created_at\"`\n\tUpdatedAt time.Time `xorm:\"updated TIMESTAMP updated_at\"`\n\tUserID    string    `xorm:\"not null default 0 BIGINT(20) user_id\"`\n\tRoleID    int       `xorm:\"not null default 0 INT(11) role_id\"`\n}\n```\nUserRoleRel role\n\n```go\nfunc (UserRoleRel) TableName() string\n```\nTableName user role rel table name\n\n```go\ntype UserSearch struct {\n\tUser\n\tPage     int `json:\"page\" form:\"page\"`           // Query number of pages\n\tPageSize int `json:\"page_size\" form:\"page_size\"` // Search page size\n}\n```\n\n```go\ntype Version struct {\n\tID            int   `xorm:\"not null pk autoincr INT(11) id\"`\n\tVersionNumber int64 `xorm:\"not null default 0 INT(11) version_number\"`\n}\n```\nVersion version\n\n```go\nfunc (Version) TableName() string\n```\nTableName config table name\n\n","path":"github.com/apache/answer/internal/entity","name":"entity","synopsis":"","isRedistributable":true}
