Files
lone-services/services/wecom/internal/dao/review.go
T

34 lines
2.0 KiB
Go

package dao
import "lone-services/pkg/utils"
const (
WecomReviewActionAgree = "agree"
WecomReviewActionReject = "reject"
WecomReviewActionExpired = "expired"
WecomReviewAgree = 1
WecomReviewReject = 2
WecomReviewPending = 3
WecomReviewExpired = 4
WecomReviewAgreeFormat = "已通过"
WecomReviewRejectFormat = "已拒绝"
WecomReviewExpiredFormat = "已过期"
)
type WecomReviewTask struct {
Id int `gorm:"column:id;primaryKey;autoIncrement;comment:主键ID" json:"id"`
AgentId int `gorm:"column:agent_id;type:int(11);not null;default:0;comment:agentId" json:"agent_id"`
ResponseCode string `gorm:"column:response_code;type:varchar(255);not null;default:'';comment:response_code" json:"response_code"`
TaskId string `gorm:"column:task_id;type:varchar(64);not null;default:0;comment:企业微信任务ID" json:"task_id"`
ObjId int `gorm:"column:obj_id;type:int(11);not null;default:0;comment:业务对象ID" json:"obj_id"`
ObjType uint8 `gorm:"column:obj_type;type:tinyint(1);not null;default:0;comment:业务对象类型,1:产品,2:门店,3:地址" json:"obj_type"`
Type uint8 `gorm:"column:type;type:tinyint(1);not null;default:0;comment:消息类型,1:审核,2:通知" json:"type"`
Payload string `gorm:"column:payload;type:text;not null;comment:原始内容" json:"payload"`
DetailUrl string `gorm:"column:detail_url;type:varchar(255);not null;default:'';comment:详情跳转链接" json:"detail_url"`
ReviewStatus uint8 `gorm:"column:review_status;type:tinyint(1);not null;default:3;comment:审核状态,3:待审核,1:通过,2:拒绝" json:"review_status"`
CreatedAt utils.CustomTime `gorm:"column:created_at;type:datetime;default:NULL;comment:创建时间" json:"created_at"`
UpdatedAt utils.CustomTime `gorm:"column:updated_at;type:datetime;default:NULL;comment:更新时间" json:"updated_at"`
}