实现 SickPigManager

This commit is contained in:
2025-10-06 18:50:22 +08:00
parent 67b45d2e05
commit 691810c591
3 changed files with 127 additions and 2 deletions

View File

@@ -32,7 +32,6 @@ type PigSickLog struct {
gorm.Model
PigBatchID uint `gorm:"primaryKey;comment:关联的猪批次ID"`
PenID uint `gorm:"not null;index;comment:所在猪圈ID"`
PigIDs string `gorm:"size:500;comment:涉及的猪只ID列表逗号分隔"`
ChangeCount int `gorm:"not null;comment:变化数量, 正数表示新增, 负数表示移除"`
Reason PigBatchSickPigReasonType `gorm:"size:20;not null;comment:变化原因 (如: 患病, 康复, 死亡, 转入, 转出, 其他)"`
BeforeCount int `gorm:"comment:变化前的数量"`