定义病猪子服务
This commit is contained in:
@@ -80,8 +80,8 @@ const (
|
||||
ReasonTypeHealthCare MedicationReasonType = "保健"
|
||||
)
|
||||
|
||||
// GroupMedicationLog 记录了对整个猪批次的用药情况
|
||||
type GroupMedicationLog struct {
|
||||
// MedicationLog 记录了对整个猪批次的用药情况
|
||||
type MedicationLog struct {
|
||||
gorm.Model
|
||||
PigBatchID uint `gorm:"not null;index;comment:关联的猪批次ID"`
|
||||
MedicationID uint `gorm:"not null;index;comment:关联的药品ID"`
|
||||
@@ -94,6 +94,6 @@ type GroupMedicationLog struct {
|
||||
HappenedAt time.Time `gorm:"primaryKey;comment:用药时间"`
|
||||
}
|
||||
|
||||
func (GroupMedicationLog) TableName() string {
|
||||
return "group_medication_logs"
|
||||
func (MedicationLog) TableName() string {
|
||||
return "medication_logs"
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ func GetAllModels() []interface{} {
|
||||
&WeighingBatch{},
|
||||
&WeighingRecord{},
|
||||
&PigTransferLog{},
|
||||
&PigBatchSickPigLog{},
|
||||
&PigSickLog{},
|
||||
|
||||
// Pig Buy & Sell
|
||||
&PigPurchase{},
|
||||
@@ -58,7 +58,7 @@ func GetAllModels() []interface{} {
|
||||
|
||||
// Medication Models
|
||||
&Medication{},
|
||||
&GroupMedicationLog{},
|
||||
&MedicationLog{},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user