feat (material): change item id datatype
This commit is contained in:
No files matched your search
@@ -57,7 +57,7 @@ type ResponseDto struct {
|
|||||||
Uom_Code string `json:"uom_code"`
|
Uom_Code string `json:"uom_code"`
|
||||||
Uom *eu.Uom `json:"uom,omitempty"`
|
Uom *eu.Uom `json:"uom,omitempty"`
|
||||||
Stock *int `json:"stock"`
|
Stock *int `json:"stock"`
|
||||||
Item_Id uint `json:"item_id"`
|
Item_Id *uint `json:"item_id"`
|
||||||
Item *ei.Item `json:"item,omitempty"`
|
Item *ei.Item `json:"item,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,6 @@ type Material struct {
|
|||||||
Uom_Code string `json:"uom_code" gorm:"size:10"`
|
Uom_Code string `json:"uom_code" gorm:"size:10"`
|
||||||
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
Uom *eu.Uom `json:"uom,omitempty" gorm:"foreignKey:Uom_Code;references:Code"`
|
||||||
Stock *int `json:"stock"`
|
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"`
|
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.Name = inputSrc.Name
|
||||||
data.Uom_Code = inputSrc.Uom_Code
|
data.Uom_Code = inputSrc.Uom_Code
|
||||||
data.Stock = inputSrc.Stock
|
data.Stock = inputSrc.Stock
|
||||||
data.Item_Id = *inputSrc.Item_Id
|
data.Item_Id = inputSrc.Item_Id
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user