You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
39 lines
1.3 KiB
package model
|
|
|
|
import "time"
|
|
|
|
const (
|
|
BrokerMessageTypeNormal = 1 // 常规消息
|
|
BrokerMessageTypeCustomerNormal = 2 // 用户消息
|
|
BrokerMessageTypeCustomerPay = 3 // 用户付款
|
|
BrokerMessageTypeCustomerTrail = 4 // 用户跟踪
|
|
BrokerMessageTypeCustomerInvite = 5 // 用户邀约
|
|
BrokerMessageTypeCustomerCare = 6 // 用户关怀
|
|
BrokerMessageTypeBill = 7 // 分账
|
|
BrokerMessageTypeCarAudit = 11 // 车辆发布
|
|
BrokerMessageTypeCarEdit = 12 // 车辆编辑
|
|
BrokerMessageTypeContractConsignment = 21 // 寄售合同
|
|
BrokerMessageTypeContractPurchase = 22 // 收购合同
|
|
BrokerMessageTypeContractSale = 23 // 出售合同
|
|
BrokerMessageTypeSystem = 50 // 系统消息
|
|
)
|
|
|
|
const (
|
|
BrokerMessageStatusNotRead = 1 // 未读
|
|
BrokerMessageStatusRead = 2 // 已读
|
|
)
|
|
|
|
type BrokerMessage struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
BrokerId uint // 经纪人id
|
|
Broker Broker `gorm:"foreignKey:BrokerId"`
|
|
Type uint // 消息类型
|
|
Status uint // 1=未读 2=已读
|
|
SenderUserId uint
|
|
Title string
|
|
Content string
|
|
LinkedId uint // 关联对象id
|
|
Extras string // 更多内容
|
|
CreatedAt time.Time
|
|
}
|