float64全部改float32
This commit is contained in:
@@ -48,9 +48,9 @@ type PowderInstructions struct {
|
||||
// 出栏前停药期
|
||||
WithdrawalPeriod time.Duration `json:"withdrawal_period"`
|
||||
// 拌料使用计量, 每千克体重用多少克药, 单位: g/kg
|
||||
BodyWeightDosageUsed float64 `json:"body_weight_dosage_used"`
|
||||
BodyWeightDosageUsed float32 `json:"body_weight_dosage_used"`
|
||||
// 拌料使用剂量, 每升水加多少克药或每千克饲料干重加多少克药, 单位: g/kg(L)
|
||||
MixDosageUsed float64 `json:"mix_dosage_used"`
|
||||
MixDosageUsed float32 `json:"mix_dosage_used"`
|
||||
// 拌料使用方式, 兑水/拌料
|
||||
MixType MixType `json:"mix_type"`
|
||||
}
|
||||
@@ -61,8 +61,8 @@ type Medication struct {
|
||||
Name string `gorm:"size:100;not null;comment:药品名称" json:"name"`
|
||||
Type MedicationType `gorm:"size:20;not null;comment:兽药类型 (粉剂, 针剂, 疫苗)" json:"type"`
|
||||
Category MedicationCategory `gorm:"size:30;not null;comment:兽药种类 (四环素类, 磺胺类等)" json:"category"`
|
||||
DosagePerUnit float64 `gorm:"size:50;comment:一份药物的计量 (针剂计量单位为毫升, 粉剂为克)" json:"dosage_per_unit"`
|
||||
ActiveIngredientConcentration float64 `gorm:"size:50;comment:有效成分含量百分比" json:"active_ingredient_concentration"`
|
||||
DosagePerUnit float32 `gorm:"size:50;comment:一份药物的计量 (针剂计量单位为毫升, 粉剂为克)" json:"dosage_per_unit"`
|
||||
ActiveIngredientConcentration float32 `gorm:"size:50;comment:有效成分含量百分比" json:"active_ingredient_concentration"`
|
||||
Manufacturer string `gorm:"size:100;comment:生产厂家" json:"manufacturer"`
|
||||
Instructions datatypes.JSON `gorm:"type:jsonb;comment:使用说明" json:"instructions"`
|
||||
}
|
||||
@@ -86,7 +86,7 @@ type MedicationLog struct {
|
||||
PigBatchID uint `gorm:"not null;index;comment:关联的猪批次ID"`
|
||||
MedicationID uint `gorm:"not null;index;comment:关联的药品ID"`
|
||||
Medication Medication `gorm:"foreignKey:MedicationID"` // 预加载药品信息
|
||||
DosageUsed float64 `gorm:"not null;comment:使用的总剂量 (单位由药品决定,如g或ml)"`
|
||||
DosageUsed float32 `gorm:"not null;comment:使用的总剂量 (单位由药品决定,如g或ml)"`
|
||||
TargetCount int `gorm:"not null;comment:用药对象数量"`
|
||||
Reason MedicationReasonType `gorm:"size:20;not null;comment:用药原因"`
|
||||
Description string `gorm:"size:255;comment:具体描述,如'治疗呼吸道病'"`
|
||||
|
||||
Reference in New Issue
Block a user