package types

import (
	"time"

	"gorm.io/gorm"
)

type BeamGroup struct {
	Inst      string         `json:"INST"`
	DateTime  string         `json:"DATE_TIME"`
	BeamDatN  int            `json:"BEAM_DAT_N" gorm:"primaryKey;autoIncrement:false"`
	SchedulNo int            `json:"SCHEDUL_NO"`
	NoOfBeam  int            `json:"NO_OF_BEAM"`
	MaterCode string         `json:"MATER_CODE"`
	POrderNo  int            `json:"P_ORDER_NO"`
	IWeight   string         `json:"I_WEIGHT"`
	IWeightT  string         `json:"I_WEIGHT_T"`
	ILength   string         `json:"I_LENGTH"`
	ILengthT  string         `json:"I_LENGTH_T"`
	BeamCutN  int            `json:"BEAM_CUT_N"`
	LayCutP1  int            `json:"LAY_CUT_P1"`
	LayCutP2  int            `json:"LAY_CUT_P2"`
	Sortb     string         `json:"SORTB"`
	CreatedAt time.Time      `gorm:"->;<-:create" json:"createdat,omitempty"`
	UpdatedAt time.Time      `json:"updated_at,omitempty"`
	DeletedAt gorm.DeletedAt `gorm:"index"`
}

func (BeamGroup) TableName() string {
	return "sap_bg"
}
