Files
ai-agent/internal/pkg/dto/request/agent_request.go
T
mlogclub 8646b002c1 feat: add calendar scheduling feature for agent teams
- Implemented FindCalendarSchedules method in agentTeamScheduleService to retrieve schedules within a specified time range.
- Added new API endpoint fetchAgentTeamScheduleCalendar to fetch schedules for the calendar view.
- Created ScheduleCalendar component to display agent team schedules in a calendar format with drag-and-drop functionality for moving and resizing schedules.
- Updated EditDialog component to support deleting schedules and handling default values for new entries.
- Enhanced DashboardAgentTeamSchedulesPage to toggle between calendar and list views, and to load calendar data based on selected week.
- Added tests for FindCalendarSchedules to ensure correct schedule retrieval and validation of time ranges.
2026-04-29 09:23:54 +08:00

71 lines
2.0 KiB
Go

package request
import "cs-agent/internal/pkg/enums"
type CreateAgentProfileRequest struct {
UserID int64 `json:"userId"`
TeamID int64 `json:"teamId"`
AgentCode string `json:"agentCode"`
DisplayName string `json:"displayName"`
Avatar string `json:"avatar"`
ServiceStatus enums.ServiceStatus `json:"serviceStatus"`
MaxConcurrentCount int `json:"maxConcurrentCount"`
PriorityLevel int `json:"priorityLevel"`
AutoAssignEnabled bool `json:"autoAssignEnabled"`
ReceiveOfflineMessage bool `json:"receiveOfflineMessage"`
Remark string `json:"remark"`
}
type UpdateAgentProfileRequest struct {
ID int64 `json:"id"`
CreateAgentProfileRequest
}
type DeleteAgentProfileRequest struct {
ID int64 `json:"id"`
}
type CreateAgentTeamRequest struct {
Name string `json:"name"`
LeaderUserID int64 `json:"leaderUserId"`
Status int `json:"status"`
Description string `json:"description"`
Remark string `json:"remark"`
}
type UpdateAgentTeamRequest struct {
ID int64 `json:"id"`
Name string `json:"name"`
LeaderUserID int64 `json:"leaderUserId"`
Status int `json:"status"`
Description string `json:"description"`
Remark string `json:"remark"`
}
type DeleteAgentTeamRequest struct {
ID int64 `json:"id"`
}
type CreateAgentTeamScheduleRequest struct {
TeamID int64 `json:"teamId"`
StartAt string `json:"startAt"`
EndAt string `json:"endAt"`
SourceType string `json:"sourceType"`
Remark string `json:"remark"`
}
type UpdateAgentTeamScheduleRequest struct {
ID int64 `json:"id"`
CreateAgentTeamScheduleRequest
}
type DeleteAgentTeamScheduleRequest struct {
ID int64 `json:"id"`
}
type AgentTeamScheduleCalendarRequest struct {
StartAt string `json:"startAt"`
EndAt string `json:"endAt"`
TeamID int64 `json:"teamId"`
}