fix(chat): 分销站点客服会话按归属租户可见
This commit is contained in:
@@ -72,6 +72,20 @@ func (ChatAdminConversationState) TableName() string {
|
||||
return "chat_admin_conversation_states"
|
||||
}
|
||||
|
||||
// ChatSiteTenantLink 将历史分销站点的平台客服会话归属到负责接待的经营租户。
|
||||
// 该表只服务聊天权限,不改变 distribution_sites 的原有分销语义。
|
||||
type ChatSiteTenantLink struct {
|
||||
SiteID uint64 `gorm:"primaryKey" json:"site_id"`
|
||||
TenantID uint64 `gorm:"not null;index:idx_chat_site_tenant_links_tenant" json:"tenant_id"`
|
||||
Enabled bool `gorm:"not null;default:true" json:"enabled"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
func (ChatSiteTenantLink) TableName() string {
|
||||
return "chat_site_tenant_links"
|
||||
}
|
||||
|
||||
type ChatMessage struct {
|
||||
ID uint64 `gorm:"primaryKey" json:"id"`
|
||||
ConversationID uint64 `gorm:"not null;index" json:"conversation_id"`
|
||||
|
||||
Reference in New Issue
Block a user