Files

24 lines
986 B
Go

package material
import (
ecore "simrs-vx/internal/domain/base-entities/core"
ein "simrs-vx/internal/domain/main-entities/infra"
ei "simrs-vx/internal/domain/main-entities/item"
eu "simrs-vx/internal/domain/main-entities/uom"
)
type Material struct {
ecore.Main // adjust this according to the needs
Code string `json:"code" gorm:"unique;size:10"`
Name string `json:"name" gorm:"size:50"`
Uom_Code string `json:"uom_code" gorm:"size:10"`
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
Infra_Id *uint16 `json:"infra_id"`
Infra_Code *string `json:"infra_code" gorm:"size:10"`
Infra *ein.Infra `json:"infra,omitempty" gorm:"foreignKey:Infra_Id;references:Id"`
Stock *int `json:"stock"`
Item_Id *uint `json:"item_id"`
Item_Code *string `json:"item_code" gorm:"size:50"`
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
}