perf(chat): 分页客服会话并拆分统计查询
This commit is contained in:
@@ -60,15 +60,16 @@ func (ChatAdminConversationState) TableName() string {
|
||||
}
|
||||
|
||||
type ChatMessage struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
ConversationID uint64 `gorm:"not null;index" json:"conversation_id"`
|
||||
SenderType string `gorm:"size:16;not null" json:"sender_type"`
|
||||
SenderID uint64 `gorm:"not null;default:0" json:"sender_id"`
|
||||
SenderRole string `gorm:"size:32;not null;default:''" json:"sender_role"`
|
||||
ContentType string `gorm:"size:32;not null;default:'text'" json:"content_type"`
|
||||
Content string `json:"content"`
|
||||
AttachmentURLS datatypes.JSON `gorm:"column:attachment_urls" json:"attachment_urls"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
ConversationID uint64 `gorm:"not null;index" json:"conversation_id"`
|
||||
SenderType string `gorm:"size:16;not null" json:"sender_type"`
|
||||
SenderID uint64 `gorm:"not null;default:0" json:"sender_id"`
|
||||
SenderRole string `gorm:"size:32;not null;default:''" json:"sender_role"`
|
||||
ContentType string `gorm:"size:32;not null;default:'text'" json:"content_type"`
|
||||
Content string `json:"content"`
|
||||
AttachmentURLS datatypes.JSON `gorm:"column:attachment_urls" json:"attachment_urls"`
|
||||
AdminAttentionType string `gorm:"column:admin_attention_type;size:32;not null;default:'';index" json:"admin_attention_type"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
func (ChatMessage) TableName() string {
|
||||
|
||||
Reference in New Issue
Block a user