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"`