定义model

This commit is contained in:
2025-10-03 22:17:28 +08:00
parent 258e350c35
commit c50366f670

View File

@@ -45,6 +45,11 @@ func (PigBatch) TableName() string {
return "pig_batches"
}
// IsActive 判断猪批次是否处于活跃状态
func (pb PigBatch) IsActive() bool {
return pb.Status != BatchStatusSold && pb.Status != BatchStatusArchived
}
// LogChangeType 定义了猪批次数量变更的类型
type LogChangeType string