feat (material): change item id datatype
This commit is contained in:
@@ -57,7 +57,7 @@ type ResponseDto struct {
|
||||
Uom_Code string `json:"uom_code"`
|
||||
Uom *eu.Uom `json:"uom,omitempty"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id uint `json:"item_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty"`
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,6 @@ type Material struct {
|
||||
Uom_Code string `json:"uom_code" gorm:"size:10"`
|
||||
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||
Stock *int `json:"stock"`
|
||||
Item_Id uint `json:"item_id"`
|
||||
Item_Id *uint `json:"item_id"`
|
||||
Item *ei.Item `json:"item,omitempty" gorm:"foreignKey:Item_Id;references:Id"`
|
||||
}
|
||||
|
||||
@@ -21,5 +21,5 @@ func setData[T *e.CreateDto | *e.UpdateDto](input T, data *e.Material) {
|
||||
data.Name = inputSrc.Name
|
||||
data.Uom_Code = inputSrc.Uom_Code
|
||||
data.Stock = inputSrc.Stock
|
||||
data.Item_Id = *inputSrc.Item_Id
|
||||
data.Item_Id = inputSrc.Item_Id
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user