ListPigSickLogs
This commit is contained in:
@@ -497,3 +497,42 @@ type ListPigTransferLogResponse struct {
|
||||
List []PigTransferLogDTO `json:"list"`
|
||||
Pagination PaginationDTO `json:"pagination"`
|
||||
}
|
||||
|
||||
// --- PigSickLog ---
|
||||
|
||||
// ListPigSickLogRequest 定义了获取病猪日志列表的请求参数
|
||||
type ListPigSickLogRequest struct {
|
||||
Page int `form:"page,default=1"`
|
||||
PageSize int `form:"pageSize,default=10"`
|
||||
PigBatchID *uint `form:"pig_batch_id"`
|
||||
PenID *uint `form:"pen_id"`
|
||||
Reason *string `form:"reason"`
|
||||
TreatmentLocation *string `form:"treatment_location"`
|
||||
OperatorID *uint `form:"operator_id"`
|
||||
StartTime *time.Time `form:"start_time" time_format:"rfc3339"`
|
||||
EndTime *time.Time `form:"end_time" time_format:"rfc3339"`
|
||||
OrderBy string `form:"order_by"`
|
||||
}
|
||||
|
||||
// PigSickLogDTO 是用于API响应的病猪日志结构
|
||||
type PigSickLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
PigBatchID uint `json:"pig_batch_id"`
|
||||
PenID uint `json:"pen_id"`
|
||||
ChangeCount int `json:"change_count"`
|
||||
Reason models.PigBatchSickPigReasonType `json:"reason"`
|
||||
BeforeCount int `json:"before_count"`
|
||||
AfterCount int `json:"after_count"`
|
||||
Remarks string `json:"remarks"`
|
||||
TreatmentLocation models.PigBatchSickPigTreatmentLocation `json:"treatment_location"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
HappenedAt time.Time `json:"happened_at"`
|
||||
}
|
||||
|
||||
// ListPigSickLogResponse 是获取病猪日志列表的响应结构
|
||||
type ListPigSickLogResponse struct {
|
||||
List []PigSickLogDTO `json:"list"`
|
||||
Pagination PaginationDTO `json:"pagination"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user