From 258e350c353a2d552610d797e5dd6fac457bcff7 Mon Sep 17 00:00:00 2001 From: huang <1724659546@qq.com> Date: Fri, 3 Oct 2025 22:00:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E4=B9=89model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/infra/models/medication.go | 2 +- internal/infra/models/pig.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/infra/models/medication.go b/internal/infra/models/medication.go index 1f0b752..c6ead4a 100644 --- a/internal/infra/models/medication.go +++ b/internal/infra/models/medication.go @@ -90,7 +90,7 @@ type GroupMedicationLog struct { TargetCount int `gorm:"not null;comment:用药对象数量"` Reason MedicationReasonType `gorm:"size:20;not null;comment:用药原因"` Description string `gorm:"size:255;comment:具体描述,如'治疗呼吸道病'"` - Operator string `gorm:"size:50;comment:操作员"` + OperatorID uint `gorm:"comment:操作员ID"` HappenedAt time.Time `gorm:"primaryKey;comment:用药时间"` } diff --git a/internal/infra/models/pig.go b/internal/infra/models/pig.go index 485fff7..037b507 100644 --- a/internal/infra/models/pig.go +++ b/internal/infra/models/pig.go @@ -70,7 +70,7 @@ type PigBatchLog struct { AfterCount int `gorm:"not null;comment:变更后总数"` BeforeSickCount int `gorm:"not null;comment:变更前病猪数"` AfterSickCount int `gorm:"not null;comment:变更后病猪数"` - Operator string `gorm:"size:50;comment:操作员"` + OperatorID uint `gorm:"comment:操作员ID"` HappenedAt time.Time `gorm:"primaryKey;comment:事件发生时间"` }