实现修改批次绑定的猪栏

This commit is contained in:
2025-10-04 00:47:27 +08:00
parent d03163a189
commit 8bb0a54f18
13 changed files with 498 additions and 27 deletions

View File

@@ -3,7 +3,7 @@ package dto
import (
"time"
"git.huangwc.com/pig/pig-farm-controller/internal/infra/models" // 导入 models 包以使用 PigBatchOriginType 和 PigBatchStatus
"git.huangwc.com/pig/pig-farm-controller/internal/infra/models"
)
// PigBatchCreateDTO 定义了创建猪批次的请求结构
@@ -43,3 +43,8 @@ type PigBatchResponseDTO struct {
CreateTime time.Time `json:"create_time"` // 创建时间
UpdateTime time.Time `json:"update_time"` // 更新时间
}
// PigBatchUpdatePensRequest 用于更新猪批次关联猪栏的请求体
type PigBatchUpdatePensRequest struct {
PenIDs []uint `json:"penIDs" binding:"required,min=0" example:"[1,2,3]"`
}