package dao import "lone-services/pkg/utils" const ( // 目标类型 TargetTypeAgent = 1 //代理 TargetTypeStore = 2 //门店 TargetTypeUser = 3 //个人 // 类型 ObjTypeAgent = 1 //添加代理 ObjTypeStore = 2 //加门店 ObjTypeSupply = 3 //审核补货 ) type MessageCreate struct { Id int64 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"` Content string `gorm:"column:content;type:varchar(255);comment:内容;NOT NULL" json:"content"` TargetType int32 `gorm:"column:target_type;type:tinyint(1);comment:目标类型,1为销售,2为门店,3为个人;NOT NULL" json:"target_type"` TargetId int64 `gorm:"column:target_id;type:int(11);comment:目标ID,发给谁;NOT NULL" json:"target_id"` TypeStatus int32 `gorm:"column:type_status;type:tinyint(1);comment:类型状态,目前1为通过,2为未通过;NOT NULL" json:"type_status"` Type int32 `gorm:"column:type;type:tinyint(2);comment:类型,1为申请代理,2为添加门店,3为审核补货;NOT NULL" json:"type"` ObjId int64 `gorm:"column:obj_id;type:int(11);comment:对像ID;NOT NULL" json:"obj_id"` } type MessageInfo struct { Id int64 `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT;comment:ID" json:"id"` Content string `gorm:"column:content;type:varchar(255);comment:内容;NOT NULL" json:"content"` TargetType int32 `gorm:"column:target_type;type:tinyint(1);comment:目标类型,1为销售,2为门店,3为个人;NOT NULL" json:"target_type"` TargetId int64 `gorm:"column:target_id;type:int(11);comment:目标ID,发给谁;NOT NULL" json:"target_id"` TypeStatus int32 `gorm:"column:type_status;type:tinyint(1);comment:类型状态,目前1为通过,2为未通过;NOT NULL" json:"type_status"` Type int32 `gorm:"column:type;type:tinyint(2);comment:类型,1为申请代理,2为添加门店,3为审核补货;NOT NULL" json:"type"` ObjId int64 `gorm:"column:obj_id;type:int(11);comment:对像ID;NOT NULL" json:"obj_id"` Status int32 `gorm:"column:status;type:tinyint(1);default:2;comment:状态,1为已读,2为未读;NOT NULL" json:"status"` UpdateTime utils.CustomTime `gorm:"column:update_time;type:datetime;default:CURRENT_TIMESTAMP;comment:更新时间" json:"update_time"` CreateTime utils.CustomTime `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP;comment:添加时间" json:"create_time"` } type MessageStatus struct { Status int32 `gorm:"column:status;type:tinyint(1);default:9;comment:9是待处理 1是已通过 2是未通过,3为禁用;NOT NULL" json:"status"` }