定义model
This commit is contained in:
@@ -36,9 +36,8 @@ type PigBatch struct {
|
||||
BatchNumber string `gorm:"size:50;not null;uniqueIndex;comment:批次编号,如 2024-W25-A01"`
|
||||
OriginType PigBatchOriginType `gorm:"size:20;not null;comment:批次来源 (自繁, 外购)"`
|
||||
StartDate time.Time `gorm:"not null;comment:批次开始日期 (如转入日或购买日)"`
|
||||
EndDate time.Time `gorm:"not null;comment:批次结束日期 (全部淘汰或售出)"`
|
||||
InitialCount int `gorm:"not null;comment:初始数量"`
|
||||
CurrentCount int `gorm:"not null;comment:当前存栏数量"`
|
||||
CurrentSickCount int `gorm:"not null;default:0;comment:当前病猪数量"`
|
||||
Status PigBatchStatus `gorm:"size:20;not null;index;comment:批次状态"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user