uint/uint64全部改为uint32
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
type ListSensorDataRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
DeviceID *uint `json:"device_id" query:"device_id"`
|
||||
DeviceID *uint32 `json:"device_id" query:"device_id"`
|
||||
SensorType *string `json:"sensor_type" query:"sensor_type"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
@@ -23,8 +23,8 @@ type ListSensorDataRequest struct {
|
||||
// SensorDataDTO 是用于API响应的传感器数据结构
|
||||
type SensorDataDTO struct {
|
||||
Time time.Time `json:"time"`
|
||||
DeviceID uint `json:"device_id"`
|
||||
AreaControllerID uint `json:"area_controller_id"`
|
||||
DeviceID uint32 `json:"device_id"`
|
||||
AreaControllerID uint32 `json:"area_controller_id"`
|
||||
SensorType models.SensorType `json:"sensor_type"`
|
||||
Data json.RawMessage `json:"data"`
|
||||
}
|
||||
@@ -41,7 +41,7 @@ type ListSensorDataResponse struct {
|
||||
type ListDeviceCommandLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
DeviceID *uint `json:"device_id" query:"device_id"`
|
||||
DeviceID *uint32 `json:"device_id" query:"device_id"`
|
||||
ReceivedSuccess *bool `json:"received_success" query:"received_success"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
@@ -51,7 +51,7 @@ type ListDeviceCommandLogRequest struct {
|
||||
// DeviceCommandLogDTO 是用于API响应的设备命令日志结构
|
||||
type DeviceCommandLogDTO struct {
|
||||
MessageID string `json:"message_id"`
|
||||
DeviceID uint `json:"device_id"`
|
||||
DeviceID uint32 `json:"device_id"`
|
||||
SentAt time.Time `json:"sent_at"`
|
||||
AcknowledgedAt *time.Time `json:"acknowledged_at"`
|
||||
ReceivedSuccess bool `json:"received_success"`
|
||||
@@ -69,7 +69,7 @@ type ListDeviceCommandLogResponse struct {
|
||||
type ListPlanExecutionLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PlanID *uint `json:"plan_id" query:"plan_id"`
|
||||
PlanID *uint32 `json:"plan_id" query:"plan_id"`
|
||||
Status *string `json:"status" query:"status"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
@@ -78,10 +78,10 @@ type ListPlanExecutionLogRequest struct {
|
||||
|
||||
// PlanExecutionLogDTO 是用于API响应的计划执行日志结构
|
||||
type PlanExecutionLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
PlanID uint `json:"plan_id"`
|
||||
PlanID uint32 `json:"plan_id"`
|
||||
PlanName string `json:"plan_name"`
|
||||
Status models.ExecutionStatus `json:"status"`
|
||||
StartedAt time.Time `json:"started_at"`
|
||||
@@ -101,7 +101,7 @@ type ListPlanExecutionLogResponse struct {
|
||||
type ListTaskExecutionLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PlanExecutionLogID *uint `json:"plan_execution_log_id" query:"plan_execution_log_id"`
|
||||
PlanExecutionLogID *uint32 `json:"plan_execution_log_id" query:"plan_execution_log_id"`
|
||||
TaskID *int `json:"task_id" query:"task_id"`
|
||||
Status *string `json:"status" query:"status"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
@@ -111,17 +111,17 @@ type ListTaskExecutionLogRequest struct {
|
||||
|
||||
// TaskDTO 是用于API响应的简化版任务结构
|
||||
type TaskDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// TaskExecutionLogDTO 是用于API响应的任务执行日志结构
|
||||
type TaskExecutionLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
PlanExecutionLogID uint `json:"plan_execution_log_id"`
|
||||
PlanExecutionLogID uint32 `json:"plan_execution_log_id"`
|
||||
TaskID int `json:"task_id"`
|
||||
Task TaskDTO `json:"task"` // 嵌套的任务信息
|
||||
Status models.ExecutionStatus `json:"status"`
|
||||
@@ -142,7 +142,7 @@ type ListTaskExecutionLogResponse struct {
|
||||
type ListPendingCollectionRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
DeviceID *uint `json:"device_id" query:"device_id"`
|
||||
DeviceID *uint32 `json:"device_id" query:"device_id"`
|
||||
Status *string `json:"status" query:"status"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
@@ -152,7 +152,7 @@ type ListPendingCollectionRequest struct {
|
||||
// PendingCollectionDTO 是用于API响应的待采集请求结构
|
||||
type PendingCollectionDTO struct {
|
||||
CorrelationID string `json:"correlation_id"`
|
||||
DeviceID uint `json:"device_id"`
|
||||
DeviceID uint32 `json:"device_id"`
|
||||
CommandMetadata models.UintArray `json:"command_metadata"`
|
||||
Status models.PendingCollectionStatus `json:"status"`
|
||||
FulfilledAt *time.Time `json:"fulfilled_at"`
|
||||
@@ -171,7 +171,7 @@ type ListPendingCollectionResponse struct {
|
||||
type ListUserActionLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
UserID *uint `json:"user_id" query:"user_id"`
|
||||
UserID *uint32 `json:"user_id" query:"user_id"`
|
||||
Username *string `json:"username" query:"username"`
|
||||
ActionType *string `json:"action_type" query:"action_type"`
|
||||
Status *string `json:"status" query:"status"`
|
||||
@@ -182,9 +182,9 @@ type ListUserActionLogRequest struct {
|
||||
|
||||
// UserActionLogDTO 是用于API响应的用户操作日志结构
|
||||
type UserActionLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
Time time.Time `json:"time"`
|
||||
UserID uint `json:"user_id"`
|
||||
UserID uint32 `json:"user_id"`
|
||||
Username string `json:"username"`
|
||||
SourceIP string `json:"source_ip"`
|
||||
ActionType string `json:"action_type"`
|
||||
@@ -208,7 +208,7 @@ type ListUserActionLogResponse struct {
|
||||
type ListRawMaterialPurchaseRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
RawMaterialID *uint `json:"raw_material_id" query:"raw_material_id"`
|
||||
RawMaterialID *uint32 `json:"raw_material_id" query:"raw_material_id"`
|
||||
Supplier *string `json:"supplier" query:"supplier"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
@@ -217,14 +217,14 @@ type ListRawMaterialPurchaseRequest struct {
|
||||
|
||||
// RawMaterialDTO 是用于API响应的简化版原料结构
|
||||
type RawMaterialDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// RawMaterialPurchaseDTO 是用于API响应的原料采购结构
|
||||
type RawMaterialPurchaseDTO struct {
|
||||
ID uint `json:"id"`
|
||||
RawMaterialID uint `json:"raw_material_id"`
|
||||
ID uint32 `json:"id"`
|
||||
RawMaterialID uint32 `json:"raw_material_id"`
|
||||
RawMaterial RawMaterialDTO `json:"raw_material"`
|
||||
Supplier string `json:"supplier"`
|
||||
Amount float32 `json:"amount"`
|
||||
@@ -246,9 +246,9 @@ type ListRawMaterialPurchaseResponse struct {
|
||||
type ListRawMaterialStockLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
RawMaterialID *uint `json:"raw_material_id" query:"raw_material_id"`
|
||||
RawMaterialID *uint32 `json:"raw_material_id" query:"raw_material_id"`
|
||||
SourceType *string `json:"source_type" query:"source_type"`
|
||||
SourceID *uint `json:"source_id" query:"source_id"`
|
||||
SourceID *uint32 `json:"source_id" query:"source_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -256,11 +256,11 @@ type ListRawMaterialStockLogRequest struct {
|
||||
|
||||
// RawMaterialStockLogDTO 是用于API响应的原料库存日志结构
|
||||
type RawMaterialStockLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
RawMaterialID uint `json:"raw_material_id"`
|
||||
ID uint32 `json:"id"`
|
||||
RawMaterialID uint32 `json:"raw_material_id"`
|
||||
ChangeAmount float32 `json:"change_amount"`
|
||||
SourceType models.StockLogSourceType `json:"source_type"`
|
||||
SourceID uint `json:"source_id"`
|
||||
SourceID uint32 `json:"source_id"`
|
||||
HappenedAt time.Time `json:"happened_at"`
|
||||
Remarks string `json:"remarks"`
|
||||
}
|
||||
@@ -277,9 +277,9 @@ type ListRawMaterialStockLogResponse struct {
|
||||
type ListFeedUsageRecordRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PenID *uint `json:"pen_id" query:"pen_id"`
|
||||
FeedFormulaID *uint `json:"feed_formula_id" query:"feed_formula_id"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
PenID *uint32 `json:"pen_id" query:"pen_id"`
|
||||
FeedFormulaID *uint32 `json:"feed_formula_id" query:"feed_formula_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -287,26 +287,26 @@ type ListFeedUsageRecordRequest struct {
|
||||
|
||||
// PenDTO 是用于API响应的简化版猪栏结构
|
||||
type PenDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// FeedFormulaDTO 是用于API响应的简化版饲料配方结构
|
||||
type FeedFormulaDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// FeedUsageRecordDTO 是用于API响应的饲料使用记录结构
|
||||
type FeedUsageRecordDTO struct {
|
||||
ID uint `json:"id"`
|
||||
PenID uint `json:"pen_id"`
|
||||
ID uint32 `json:"id"`
|
||||
PenID uint32 `json:"pen_id"`
|
||||
Pen PenDTO `json:"pen"`
|
||||
FeedFormulaID uint `json:"feed_formula_id"`
|
||||
FeedFormulaID uint32 `json:"feed_formula_id"`
|
||||
FeedFormula FeedFormulaDTO `json:"feed_formula"`
|
||||
Amount float32 `json:"amount"`
|
||||
RecordedAt time.Time `json:"recorded_at"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
Remarks string `json:"remarks"`
|
||||
}
|
||||
|
||||
@@ -322,10 +322,10 @@ type ListFeedUsageRecordResponse struct {
|
||||
type ListMedicationLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PigBatchID *uint `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
MedicationID *uint `json:"medication_id" query:"medication_id"`
|
||||
PigBatchID *uint32 `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
MedicationID *uint32 `json:"medication_id" query:"medication_id"`
|
||||
Reason *string `json:"reason" query:"reason"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -333,21 +333,21 @@ type ListMedicationLogRequest struct {
|
||||
|
||||
// MedicationDTO 是用于API响应的简化版药品结构
|
||||
type MedicationDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
// MedicationLogDTO 是用于API响应的用药记录结构
|
||||
type MedicationLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
PigBatchID uint `json:"pig_batch_id"`
|
||||
MedicationID uint `json:"medication_id"`
|
||||
ID uint32 `json:"id"`
|
||||
PigBatchID uint32 `json:"pig_batch_id"`
|
||||
MedicationID uint32 `json:"medication_id"`
|
||||
Medication MedicationDTO `json:"medication"`
|
||||
DosageUsed float32 `json:"dosage_used"`
|
||||
TargetCount int `json:"target_count"`
|
||||
Reason models.MedicationReasonType `json:"reason"`
|
||||
Description string `json:"description"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
HappenedAt time.Time `json:"happened_at"`
|
||||
}
|
||||
|
||||
@@ -363,9 +363,9 @@ type ListMedicationLogResponse struct {
|
||||
type ListPigBatchLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PigBatchID *uint `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PigBatchID *uint32 `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
ChangeType *string `json:"change_type" query:"change_type"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -373,16 +373,16 @@ type ListPigBatchLogRequest struct {
|
||||
|
||||
// PigBatchLogDTO 是用于API响应的猪批次日志结构
|
||||
type PigBatchLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
PigBatchID uint `json:"pig_batch_id"`
|
||||
PigBatchID uint32 `json:"pig_batch_id"`
|
||||
ChangeType models.LogChangeType `json:"change_type"`
|
||||
ChangeCount int `json:"change_count"`
|
||||
Reason string `json:"reason"`
|
||||
BeforeCount int `json:"before_count"`
|
||||
AfterCount int `json:"after_count"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
HappenedAt time.Time `json:"happened_at"`
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ type ListPigBatchLogResponse struct {
|
||||
type ListWeighingBatchRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PigBatchID *uint `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PigBatchID *uint32 `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -406,12 +406,12 @@ type ListWeighingBatchRequest struct {
|
||||
|
||||
// WeighingBatchDTO 是用于API响应的批次称重记录结构
|
||||
type WeighingBatchDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
WeighingTime time.Time `json:"weighing_time"`
|
||||
Description string `json:"description"`
|
||||
PigBatchID uint `json:"pig_batch_id"`
|
||||
PigBatchID uint32 `json:"pig_batch_id"`
|
||||
}
|
||||
|
||||
// ListWeighingBatchResponse 是获取批次称重记录列表的响应结构
|
||||
@@ -426,9 +426,9 @@ type ListWeighingBatchResponse struct {
|
||||
type ListWeighingRecordRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
WeighingBatchID *uint `json:"weighing_batch_id" query:"weighing_batch_id"`
|
||||
PenID *uint `json:"pen_id" query:"pen_id"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
WeighingBatchID *uint32 `json:"weighing_batch_id" query:"weighing_batch_id"`
|
||||
PenID *uint32 `json:"pen_id" query:"pen_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -436,13 +436,13 @@ type ListWeighingRecordRequest struct {
|
||||
|
||||
// WeighingRecordDTO 是用于API响应的单次称重记录结构
|
||||
type WeighingRecordDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Weight float32 `json:"weight"`
|
||||
WeighingBatchID uint `json:"weighing_batch_id"`
|
||||
PenID uint `json:"pen_id"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
WeighingBatchID uint32 `json:"weighing_batch_id"`
|
||||
PenID uint32 `json:"pen_id"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
Remark string `json:"remark"`
|
||||
WeighingTime time.Time `json:"weighing_time"`
|
||||
}
|
||||
@@ -459,10 +459,10 @@ type ListWeighingRecordResponse struct {
|
||||
type ListPigTransferLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PigBatchID *uint `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PenID *uint `json:"pen_id" query:"pen_id"`
|
||||
PigBatchID *uint32 `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PenID *uint32 `json:"pen_id" query:"pen_id"`
|
||||
TransferType *string `json:"transfer_type" query:"transfer_type"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
CorrelationID *string `json:"correlation_id" query:"correlation_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
@@ -471,16 +471,16 @@ type ListPigTransferLogRequest struct {
|
||||
|
||||
// PigTransferLogDTO 是用于API响应的猪只迁移日志结构
|
||||
type PigTransferLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
TransferTime time.Time `json:"transfer_time"`
|
||||
PigBatchID uint `json:"pig_batch_id"`
|
||||
PenID uint `json:"pen_id"`
|
||||
PigBatchID uint32 `json:"pig_batch_id"`
|
||||
PenID uint32 `json:"pen_id"`
|
||||
Quantity int `json:"quantity"`
|
||||
Type models.PigTransferType `json:"type"`
|
||||
CorrelationID string `json:"correlation_id"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
Remarks string `json:"remarks"`
|
||||
}
|
||||
|
||||
@@ -496,11 +496,11 @@ type ListPigTransferLogResponse struct {
|
||||
type ListPigSickLogRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PigBatchID *uint `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PenID *uint `json:"pen_id" query:"pen_id"`
|
||||
PigBatchID *uint32 `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PenID *uint32 `json:"pen_id" query:"pen_id"`
|
||||
Reason *string `json:"reason" query:"reason"`
|
||||
TreatmentLocation *string `json:"treatment_location" query:"treatment_location"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -508,18 +508,18 @@ type ListPigSickLogRequest struct {
|
||||
|
||||
// PigSickLogDTO 是用于API响应的病猪日志结构
|
||||
type PigSickLogDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `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"`
|
||||
PigBatchID uint32 `json:"pig_batch_id"`
|
||||
PenID uint32 `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"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
HappenedAt time.Time `json:"happened_at"`
|
||||
}
|
||||
|
||||
@@ -535,9 +535,9 @@ type ListPigSickLogResponse struct {
|
||||
type ListPigPurchaseRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PigBatchID *uint `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PigBatchID *uint32 `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
Supplier *string `json:"supplier" query:"supplier"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -545,17 +545,17 @@ type ListPigPurchaseRequest struct {
|
||||
|
||||
// PigPurchaseDTO 是用于API响应的猪只采购记录结构
|
||||
type PigPurchaseDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
PigBatchID uint `json:"pig_batch_id"`
|
||||
PigBatchID uint32 `json:"pig_batch_id"`
|
||||
PurchaseDate time.Time `json:"purchase_date"`
|
||||
Supplier string `json:"supplier"`
|
||||
Quantity int `json:"quantity"`
|
||||
UnitPrice float32 `json:"unit_price"`
|
||||
TotalPrice float32 `json:"total_price"`
|
||||
Remarks string `json:"remarks"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
}
|
||||
|
||||
// ListPigPurchaseResponse 是获取猪只采购记录列表的响应结构
|
||||
@@ -570,9 +570,9 @@ type ListPigPurchaseResponse struct {
|
||||
type ListPigSaleRequest struct {
|
||||
Page int `json:"page" query:"page"`
|
||||
PageSize int `json:"page_size" query:"page_size"`
|
||||
PigBatchID *uint `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
PigBatchID *uint32 `json:"pig_batch_id" query:"pig_batch_id"`
|
||||
Buyer *string `json:"buyer" query:"buyer"`
|
||||
OperatorID *uint `json:"operator_id" query:"operator_id"`
|
||||
OperatorID *uint32 `json:"operator_id" query:"operator_id"`
|
||||
StartTime *time.Time `json:"start_time" query:"start_time"`
|
||||
EndTime *time.Time `json:"end_time" query:"end_time"`
|
||||
OrderBy string `json:"order_by" query:"order_by"`
|
||||
@@ -580,17 +580,17 @@ type ListPigSaleRequest struct {
|
||||
|
||||
// PigSaleDTO 是用于API响应的猪只销售记录结构
|
||||
type PigSaleDTO struct {
|
||||
ID uint `json:"id"`
|
||||
ID uint32 `json:"id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
PigBatchID uint `json:"pig_batch_id"`
|
||||
PigBatchID uint32 `json:"pig_batch_id"`
|
||||
SaleDate time.Time `json:"sale_date"`
|
||||
Buyer string `json:"buyer"`
|
||||
Quantity int `json:"quantity"`
|
||||
UnitPrice float32 `json:"unit_price"`
|
||||
TotalPrice float32 `json:"total_price"`
|
||||
Remarks string `json:"remarks"`
|
||||
OperatorID uint `json:"operator_id"`
|
||||
OperatorID uint32 `json:"operator_id"`
|
||||
}
|
||||
|
||||
// ListPigSaleResponse 是获取猪只销售记录列表的响应结构
|
||||
|
||||
Reference in New Issue
Block a user