增加客服分组管理

This commit is contained in:
yml
2026-06-18 02:09:02 +08:00
parent 2223665b14
commit 233920025e
16 changed files with 1082 additions and 20 deletions
+26
View File
@@ -73,3 +73,29 @@ type ChatQrCode struct {
func (ChatQrCode) TableName() string {
return "chat_qrcode_pool"
}
type ChatSupportGroup struct {
ID uint64 `gorm:"primaryKey" json:"id"`
Code string `gorm:"size:64;not null;uniqueIndex" json:"code"`
Name string `gorm:"size:64;not null" json:"name"`
Description string `gorm:"size:255;not null;default:''" json:"description"`
Status string `gorm:"size:16;not null;default:'active';index" json:"status"`
SortOrder int `gorm:"not null;default:0" json:"sort_order"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (ChatSupportGroup) TableName() string {
return "chat_support_groups"
}
type ChatSupportGroupMember struct {
ID uint64 `gorm:"primaryKey" json:"id"`
GroupID uint64 `gorm:"not null;uniqueIndex:uk_support_group_member" json:"group_id"`
AdminID uint64 `gorm:"column:admin_user_id;not null;uniqueIndex:uk_support_group_member;index" json:"admin_id"`
CreatedAt time.Time `json:"created_at"`
}
func (ChatSupportGroupMember) TableName() string {
return "chat_support_group_members"
}