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