0f40930a41
- Rename Go module: cs-agent → bosschat - Rename all import paths across 200+ Go files - Rename SDK: cs-ai-agent-sdk → bosschat-sdk - Rename message protocol: cs-agent:* → bosschat:* - Rename JS globals: CSAgentConfig → BossChatConfig - Rename CSS classes: cs-agent-* → bosschat-* - Update Makefile APP_NAME and ARCHIVE_NAME - Update logo assets - Fix display name: BoosChat → BossChat
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
package response
|
|
|
|
import (
|
|
"bosschat/internal/models"
|
|
"bosschat/internal/pkg/enums"
|
|
)
|
|
|
|
type ChannelResponse struct {
|
|
ID int64 `json:"id"`
|
|
ChannelType string `json:"channelType"`
|
|
ChannelID string `json:"channelId"`
|
|
AIAgentID int64 `json:"aiAgentId"`
|
|
AIAgentName string `json:"aiAgentName,omitempty"`
|
|
Name string `json:"name"`
|
|
ConfigJSON string `json:"configJson"`
|
|
Status enums.Status `json:"status"`
|
|
Remark string `json:"remark"`
|
|
}
|
|
|
|
type WxWorkKFAccountResponse struct {
|
|
OpenKfID string `json:"openKfId"`
|
|
Name string `json:"name"`
|
|
Avatar string `json:"avatar"`
|
|
ManagePrivilege bool `json:"managePrivilege"`
|
|
}
|
|
|
|
func BuildChannelResponse(item *models.Channel) ChannelResponse {
|
|
if item == nil {
|
|
return ChannelResponse{}
|
|
}
|
|
return ChannelResponse{
|
|
ID: item.ID,
|
|
ChannelType: item.ChannelType,
|
|
ChannelID: item.ChannelID,
|
|
AIAgentID: item.AIAgentID,
|
|
Name: item.Name,
|
|
ConfigJSON: item.ConfigJSON,
|
|
Status: item.Status,
|
|
Remark: item.Remark,
|
|
}
|
|
}
|