uint/uint64全部改为uint32

This commit is contained in:
2025-11-10 22:23:31 +08:00
parent 3e711551e7
commit ecd2d37c70
96 changed files with 775 additions and 785 deletions

View File

@@ -2,8 +2,6 @@ package models
import (
"time"
"gorm.io/gorm"
)
// PigBatchSickPigTreatmentLocation 定义了病猪治疗地点
@@ -29,16 +27,16 @@ const (
// PigSickLog 记录了猪批次中病猪数量的变化日志
type PigSickLog struct {
gorm.Model
PigBatchID uint `gorm:"primaryKey;comment:关联的猪批次ID"`
PenID uint `gorm:"not null;index;comment:所在猪圈ID"`
Model
PigBatchID uint32 `gorm:"primaryKey;comment:关联的猪批次ID"`
PenID uint32 `gorm:"not null;index;comment:所在猪圈ID"`
ChangeCount int `gorm:"not null;comment:变化数量, 正数表示新增, 负数表示移除"`
Reason PigBatchSickPigReasonType `gorm:"size:20;not null;comment:变化原因 (如: 患病, 康复, 死亡, 转入, 转出, 其他)"`
BeforeCount int `gorm:"comment:变化前的数量"`
AfterCount int `gorm:"comment:变化后的数量"`
Remarks string `gorm:"size:255;comment:备注"`
TreatmentLocation PigBatchSickPigTreatmentLocation `gorm:"size:50;comment:治疗地点"`
OperatorID uint `gorm:"comment:操作员ID"`
OperatorID uint32 `gorm:"comment:操作员ID"`
HappenedAt time.Time `gorm:"primaryKey;comment:事件发生时间"`
}