Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMapByIds ¶
func SaveOrCreateById ¶
func UpdateLastMsg ¶
Types ¶
type Entity ¶
type Entity struct {
Id uint64 `gorm:"primaryKey;column:id;autoIncrement;not null;" json:"id"` // 主键
Type int `gorm:"column:type;type:tinyint(1);not null;default:1;" json:"type"` // 1 单聊 (C2C)
LastMsgContent string `gorm:"column:last_msg_content;type:varchar(255);default:'';" json:"lastMsgContent"` // 最后一条消息预览
LastMsgTime time.Time `gorm:"column:last_msg_time;type:datetime;not null;default:CURRENT_TIMESTAMP;" json:"lastMsgTime"` // 用于排序
CreatedAt time.Time `gorm:"column:created_at;index;autoCreateTime;<-:create;" json:"createdAt"` //
}
Click to show internal directories.
Click to hide internal directories.