cml04-plb018/internal/types/co.go

95 lines
2.9 KiB
Go
Raw Permalink Normal View History

2024-08-20 15:50:52 +02:00
package types
import (
"time"
"gorm.io/gorm"
)
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" gorm:"index"`
SchedulNo int `json:"SCHEDUL_NO"`
OrdWeight string `json:"ORD_WEIGHT"`
OrdLen string `json:"ORD_LEN"`
OrLenTU string `json:"OR_LEN_T_U"`
OrLenTL string `json:"OR_LEN_T_L"`
PackType int `json:"PACK_TYPE"`
SectLayer int `json:"SECT_LAYER"`
LayerPack int `json:"LAYER_PACK"`
SecLastL int `json:"SEC_LAST_L"`
TotalSect int `json:"TOTAL_SECT"`
PackWidth int `json:"PACK_WIDTH"`
PackHigh int `json:"PACK_HIGH"`
OutpTolU int `json:"OUTP_TOL_U"`
OutpTolD int `json:"OUTP_TOL_D"`
LogoCode int `json:"LOGO_CODE"`
SecondLab string `json:"SECOND_LAB"`
PaintText string `json:"PAINT_TEXT"`
AddLabel1 string `json:"ADD_LABEL1"`
AddLabel2 string `json:"ADD_LABEL2"`
AddLabel3 string `json:"ADD_LABEL3"`
MaterCode string `json:"MATER_CODE"`
ProduDate int `json:"PRODU_DATE"`
LangLabel string `json:"LANG_LABEL"`
Warehouse string `json:"WAREHOUSE"`
Location string `json:"LOCATION"`
Marking string `json:"MARKING"`
DisForwar string `json:"DIS_FORWAR"`
NumTies int `json:"NUM_TIES"`
DisTies string `json:"DIS_TIES"`
DisMachin string `json:"DIS_MACHIN"`
Vbeln string `json:"VBELN"`
Posnr string `json:"POSNR"`
CoType string `json:"CO_TYPE"`
LoadBed int `json:"LOAD_BED"`
SecNum int `json:"SEC_NUM"`
Numpal int `json:"NUMPAL"`
Numbul string `json:"NUMBUL"`
Marfab int `json:"MARFAB"`
Sortb string `json:"SORTB"`
Strol1 int `json:"STROL1"`
Strol2 string `json:"STROL2"`
Strol3 int `json:"STROL3"`
Strol4 int `json:"STROL4"`
Strol5 int `json:"STROL5"`
Strol6 int `json:"STROL6"`
Strol7 int `json:"STROL7"`
Strol8 int `json:"STROL8"`
Strol9 int `json:"STROL9"`
Strol10 int `json:"STROL10"`
Strol11 int `json:"STROL11"`
Strol12 int `json:"STROL12"`
Strol13 int `json:"STROL13"`
Strol14 int `json:"STROL14"`
Strol15 int `json:"STROL15"`
Strol16 string `json:"STROL16"`
Strol17 string `json:"STROL17"`
Strol18 string `json:"STROL18"`
Strol19 string `json:"STROL19"`
Strol20 string `json:"STROL20"`
Strol21 string `json:"STROL21"`
Strol22 string `json:"STROL22"`
Strol23 string `json:"STROL23"`
Strol24 string `json:"STROL24"`
Strol25 string `json:"STROL25"`
Strol26 string `json:"STROL26"`
Strol27 string `json:"STROL27"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
func (c *CustomerOrder) BeforeCreate(tx *gorm.DB) (err error) {
c.CreatedAt = time.Now()
c.UpdatedAt = time.Now()
return
}
func (c *CustomerOrder) BeforeUpdate(tx *gorm.DB) (err error) {
c.UpdatedAt = time.Now()
return
}