From a329ca000f32479544b175c2d27946c67522438d Mon Sep 17 00:00:00 2001 From: albert Date: Thu, 3 Oct 2024 00:43:16 +0200 Subject: [PATCH] wip --- internal/types/customer_order.go | 4 ++-- internal/types/production_order.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/types/customer_order.go b/internal/types/customer_order.go index a22d68f..b055ad7 100644 --- a/internal/types/customer_order.go +++ b/internal/types/customer_order.go @@ -9,8 +9,8 @@ import ( type CustomerOrder struct { Inst string `json:"INST"` DateTime string `json:"DATE_TIME"` - COrderNo int `json:"C_ORDER_NO" gorm:"primaryKey"` - POrderNo int `json:"P_ORDER_NO"` + COrderNo int `json:"C_ORDER_NO" gorm:"primaryKey;autoIncrement:false"` + POrderNo int `json:"P_ORDER_NO" gorm:"index"` SchedulNo int `json:"SCHEDUL_NO"` OrdWeight string `json:"ORD_WEIGHT"` OrdLen string `json:"ORD_LEN"` diff --git a/internal/types/production_order.go b/internal/types/production_order.go index 519d4ee..89f45f1 100644 --- a/internal/types/production_order.go +++ b/internal/types/production_order.go @@ -9,7 +9,7 @@ import ( type ProductionOrder struct { Inst string `json:"INST"` DateTime string `json:"DATE_TIME"` - POrderNo int `json:"P_ORDER_NO" gorm:"primaryKey"` + POrderNo int `json:"P_ORDER_NO" gorm:"primaryKey;autoIncrement:false"` SchedulNo int `json:"SCHEDUL_NO"` SeqNumber int `json:"SEQ_NUMBER"` PptimeWfc string `json:"PPTIME_WFC"`