package yb_community_question import ( "time" ) const ( // 回复状态 ReplyStatusDitribute = 1 ReplyStatusWait = 2 ReplyStatusDone = 3 ReplyStatusStop = 4 ) // YbCommunityQuestion 研报-问答社区表 type YbCommunityQuestion struct { CommunityQuestionID int `gorm:"primaryKey;column:community_question_id;type:int(10) unsigned;not null" json:"-"` UserID int `gorm:"index:idx_user_id;column:user_id;type:int(10) unsigned;not null;default:0" json:"userId"` // 提问用户ID UserOpenid string `gorm:"column:user_openid;type:varchar(32);not null;default:''" json:"userOpenid"` // 提问人openid Mobile string `gorm:"column:mobile;type:varchar(20);not null;default:''" json:"mobile"` // 用户手机号 RealName string `gorm:"column:real_name;type:varchar(100);not null;default:''" json:"realName"` // 用户名 QuestionContent string `gorm:"column:question_content;type:varchar(255);not null;default:''" json:"questionContent"` // 问题描述 ReplierUserID int `gorm:"index:idx_replier_user_id;column:replier_user_id;type:int(10) unsigned;not null;default:0" json:"replierUserId"` // 回复人的user_id ReplierOpenid string `gorm:"column:replier_openid;type:varchar(32);not null;default:''" json:"replierOpenid"` // 回复人openid ReplierAdminID int `gorm:"column:replier_admin_id;type:int(10) unsigned;not null;default:0" json:"replierAdminId"` // 回复人关联的admin_id ReplierRealName string `gorm:"column:replier_real_name;type:varchar(30);not null;default:''" json:"replierRealName"` // 回复人姓名 ReplierAvatar string `gorm:"column:replier_avatar;type:varchar(255);not null;default:''" json:"replierAvatar"` // 回复人头像 ResearchGroupFirstID int `gorm:"column:research_group_first_id;type:int(10) unsigned;not null;default:0" json:"researchGroupFirstId"` // 回复人研究方向一级分组ID ResearchGroupSecondID int `gorm:"column:research_group_second_id;type:int(10) unsigned;not null;default:0" json:"researchGroupSecondId"` // 回复人研究方向二级分组ID ResearchGroupFirstName string `gorm:"column:research_group_first_name;type:varchar(100);not null;default:''" json:"researchGroupFirstName"` // 研究方向一级分组名称 ResearchGroupSecondName string `gorm:"column:research_group_second_name;type:varchar(100);not null;default:''" json:"researchGroupSecondName"` // 研究方向二级分组名称 DistributeAdminID int `gorm:"column:distribute_admin_id;type:int(10) unsigned;not null;default:0" json:"distributeAdminId"` // 分配人admin_id DistributeTime time.Time `gorm:"column:distribute_time;type:datetime" json:"distributeTime"` // 分配时间 VarietyTagID int `gorm:"index:idx_variety_tag_id;column:variety_tag_id;type:int(10) unsigned;not null;default:0" json:"varietyTagId"` // 标签ID VarietyTagName string `gorm:"column:variety_tag_name;type:varchar(100);not null;default:''" json:"varietyTagName"` // 标签名称 IsRead int `gorm:"column:is_read;type:tinyint(4) unsigned;not null;default:0" json:"isRead"` // 用户是否已读 0-未读 1-已读 ReplierIsRead int `gorm:"column:replier_is_read;type:tinyint(4) unsigned;not null;default:0" json:"replierIsRead"` // 回复者是否已读 0-未读 1-已读 ReplyStatus int `gorm:"column:reply_status;type:tinyint(4) unsigned;not null;default:0" json:"replyStatus"` // 回复状态 1-待分配 2-待回答 3-已回答 4-已终止 MsgSendStatus int `gorm:"column:msg_send_status;type:tinyint(4) unsigned;not null;default:0" json:"msgSendStatus"` // 消息推送进度 0-待推送 1-已推送回答人 2-已推送提问人 ReplyTime time.Time `gorm:"column:reply_time;type:datetime" json:"replyTime"` // 回复时间 CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 提问时间 ModifyTime time.Time `gorm:"column:modify_time;type:datetime;default:CURRENT_TIMESTAMP" json:"modifyTime"` // 修改时间 IsDeleted int `gorm:"column:is_deleted;type:tinyint(4) unsigned;not null;default:0" json:"isDeleted"` // 是否已删除 0-否 1-是 DeleteTime time.Time `gorm:"column:delete_time;type:datetime" json:"deleteTime"` // 删除时间 StopReason string `gorm:"column:stop_reason;type:varchar(255);not null;default:''" json:"stopReason"` // 终止原因 } // TableName get sql table name.获取数据库表名 func (m *YbCommunityQuestion) TableName() string { return "yb_community_question" } // YbCommunityQuestionColumns get sql column name.获取数据库列名 var YbCommunityQuestionColumns = struct { CommunityQuestionID string UserID string UserOpenid string Mobile string RealName string QuestionContent string ReplierUserID string ReplierOpenid string ReplierAdminID string ReplierRealName string ReplierAvatar string ResearchGroupFirstID string ResearchGroupSecondID string ResearchGroupFirstName string ResearchGroupSecondName string DistributeAdminID string DistributeTime string VarietyTagID string VarietyTagName string IsRead string ReplierIsRead string ReplyStatus string MsgSendStatus string ReplyTime string CreateTime string ModifyTime string IsDeleted string DeleteTime string }{ CommunityQuestionID: "community_question_id", UserID: "user_id", UserOpenid: "user_openid", Mobile: "mobile", RealName: "real_name", QuestionContent: "question_content", ReplierUserID: "replier_user_id", ReplierOpenid: "replier_openid", ReplierAdminID: "replier_admin_id", ReplierRealName: "replier_real_name", ReplierAvatar: "replier_avatar", ResearchGroupFirstID: "research_group_first_id", ResearchGroupSecondID: "research_group_second_id", ResearchGroupFirstName: "research_group_first_name", ResearchGroupSecondName: "research_group_second_name", DistributeAdminID: "distribute_admin_id", DistributeTime: "distribute_time", VarietyTagID: "variety_tag_id", VarietyTagName: "variety_tag_name", IsRead: "is_read", ReplierIsRead: "replier_is_read", ReplyStatus: "reply_status", MsgSendStatus: "msg_send_status", ReplyTime: "reply_time", CreateTime: "create_time", ModifyTime: "modify_time", IsDeleted: "is_deleted", DeleteTime: "delete_time", }