2026-04-17 16:28:31 +08:00
|
|
|
|
package data
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
"erp/consts/data"
|
|
|
|
|
|
entity "erp/model/entity/data"
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"gitea.com/red-future/common/beans"
|
|
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// CreateScheduleReq 创建排班请求
|
|
|
|
|
|
type CreateScheduleReq struct {
|
|
|
|
|
|
g.Meta `path:"/createSchedule" method:"post" tags:"排班管理" summary:"创建排班" dc:"创建新的排班"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
AnchorId int `json:"anchorId,string" v:"required" dc:"主播ID"`
|
|
|
|
|
|
AccountId int `json:"accountId,string" v:"required" dc:"直播账号ID"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
StartTime time.Time `json:"startTime" v:"required" dc:"开始时间"`
|
|
|
|
|
|
EndTime time.Time `json:"endTime" v:"required" dc:"结束时间"`
|
|
|
|
|
|
Status int `json:"status" d:"0" dc:"状态(0待直播 1直播中 2已结束 3已取消)"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
ProductId int64 `json:"productId,string" dc:"商品ID"`
|
|
|
|
|
|
OrderId int64 `json:"orderId,string" dc:"订单ID"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
Remark string `json:"remark" dc:"备注"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// CreateScheduleRes 创建排班响应
|
|
|
|
|
|
type CreateScheduleRes struct {
|
2026-04-21 13:31:10 +08:00
|
|
|
|
Id int64 `json:"id,string" dc:"排班ID"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ListScheduleReq 获取排班列表请求
|
|
|
|
|
|
type ListScheduleReq struct {
|
|
|
|
|
|
g.Meta `path:"/listSchedules" method:"get" tags:"排班管理" summary:"获取排班列表" dc:"分页查询排班列表"`
|
|
|
|
|
|
*beans.Page
|
2026-04-21 13:31:10 +08:00
|
|
|
|
Id int64 `json:"id,string" dc:"排班ID"`
|
|
|
|
|
|
AnchorId *int `json:"anchorId" dc:"主播ID"`
|
|
|
|
|
|
AnchorName string `json:"anchorName" dc:"主播名字(模糊查询)"`
|
|
|
|
|
|
AccountId *int `json:"accountId" dc:"直播账号ID"`
|
|
|
|
|
|
AccountName string `json:"accountName" dc:"直播账号名字(模糊查询)"`
|
|
|
|
|
|
Status *int `json:"status" dc:"状态"`
|
|
|
|
|
|
StartDate time.Time `json:"startDate" dc:"开始日期(筛选)"`
|
|
|
|
|
|
EndDate time.Time `json:"endDate" dc:"结束日期(筛选)"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ListScheduleRes 获取排班列表响应
|
|
|
|
|
|
type ListScheduleRes struct {
|
|
|
|
|
|
List []ScheduleItem `json:"list" dc:"排班列表"`
|
|
|
|
|
|
Total int `json:"total" dc:"总数"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// ScheduleItem 排班列表项
|
|
|
|
|
|
type ScheduleItem struct {
|
|
|
|
|
|
Id int64 `json:"id,string"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
AnchorId int `json:"anchorId,string"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
AnchorName string `json:"anchorName"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
AccountId int `json:"accountId,string"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
AccountName string `json:"accountName"`
|
|
|
|
|
|
Platform string `json:"platform"`
|
|
|
|
|
|
StartTime int64 `json:"startTime"`
|
|
|
|
|
|
EndTime int64 `json:"endTime"`
|
|
|
|
|
|
Status int `json:"status"`
|
|
|
|
|
|
StatusName string `json:"statusName"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
ProductId int64 `json:"productId,string"`
|
|
|
|
|
|
OrderId int64 `json:"orderId,string"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
Remark string `json:"remark"`
|
|
|
|
|
|
CreatedAt int64 `json:"createdAt"`
|
|
|
|
|
|
UpdatedAt int64 `json:"updatedAt"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetScheduleReq 获取排班详情请求
|
|
|
|
|
|
type GetScheduleReq struct {
|
|
|
|
|
|
g.Meta `path:"/getSchedule" method:"get" tags:"排班管理" summary:"获取排班详情" dc:"获取排班详情"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
Id int64 `json:"id,string" v:"required" dc:"排班ID"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetScheduleRes 获取排班详情响应
|
|
|
|
|
|
type GetScheduleRes struct {
|
|
|
|
|
|
*entity.Schedule
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// UpdateScheduleReq 更新排班请求
|
|
|
|
|
|
type UpdateScheduleReq struct {
|
|
|
|
|
|
g.Meta `path:"/updateSchedule" method:"put" tags:"排班管理" summary:"更新排班" dc:"更新排班信息"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
Id int64 `json:"id,string" v:"required" dc:"排班ID"`
|
|
|
|
|
|
AnchorId *int `json:"anchorId,string" dc:"主播ID"`
|
|
|
|
|
|
AccountId *int `json:"accountId,string" dc:"直播账号ID"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
StartTime *time.Time `json:"startTime" dc:"开始时间"`
|
|
|
|
|
|
EndTime *time.Time `json:"endTime" dc:"结束时间"`
|
|
|
|
|
|
Status *int `json:"status" dc:"状态(0待直播 1直播中 2已结束 3已取消)"`
|
|
|
|
|
|
ProductId *int64 `json:"productId" dc:"商品ID"`
|
|
|
|
|
|
OrderId *int64 `json:"orderId" dc:"订单ID"`
|
|
|
|
|
|
Remark string `json:"remark" dc:"备注"`
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// DeleteScheduleReq 删除排班请求
|
|
|
|
|
|
type DeleteScheduleReq struct {
|
|
|
|
|
|
g.Meta `path:"/deleteSchedule" method:"delete" tags:"排班管理" summary:"删除排班" dc:"删除排班"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
Id int64 `json:"id,string" v:"required" dc:"排班ID"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// UpdateScheduleStatusReq 更新排班状态请求
|
|
|
|
|
|
type UpdateScheduleStatusReq struct {
|
|
|
|
|
|
g.Meta `path:"/updateScheduleStatus" method:"put" tags:"排班管理" summary:"更新排班状态" dc:"更新排班状态"`
|
2026-04-21 13:31:10 +08:00
|
|
|
|
Id int64 `json:"id,string" v:"required" dc:"排班ID"`
|
2026-04-17 16:28:31 +08:00
|
|
|
|
Status data.ScheduleStatus `json:"status" v:"required" dc:"状态(0待直播 1直播中 2已结束 3已取消)"`
|
|
|
|
|
|
}
|