add product type id
This commit is contained in:
parent
46236aa71b
commit
f6877687c6
@ -170,6 +170,7 @@ func TestCreateProductApi(t *testing.T) {
|
|||||||
"name": product.Name,
|
"name": product.Name,
|
||||||
"selling_price": product.SellingPrice,
|
"selling_price": product.SellingPrice,
|
||||||
"purchase_price": product.PurchasePrice,
|
"purchase_price": product.PurchasePrice,
|
||||||
|
"product_type_id": product.ProductTypeID,
|
||||||
"product_category_id": product.ProductCategoryID,
|
"product_category_id": product.ProductCategoryID,
|
||||||
"stock": product.Stock,
|
"stock": product.Stock,
|
||||||
},
|
},
|
||||||
@ -177,6 +178,7 @@ func TestCreateProductApi(t *testing.T) {
|
|||||||
arg := db.CreateProductParams{
|
arg := db.CreateProductParams{
|
||||||
MerchantID: product.MerchantID,
|
MerchantID: product.MerchantID,
|
||||||
Name: product.Name,
|
Name: product.Name,
|
||||||
|
ProductTypeID: product.ProductTypeID,
|
||||||
SellingPrice: product.SellingPrice,
|
SellingPrice: product.SellingPrice,
|
||||||
PurchasePrice: product.PurchasePrice,
|
PurchasePrice: product.PurchasePrice,
|
||||||
ProductCategoryID: product.ProductCategoryID,
|
ProductCategoryID: product.ProductCategoryID,
|
||||||
@ -230,6 +232,7 @@ func randomProduct(merchantID string) db.Product {
|
|||||||
return db.Product{
|
return db.Product{
|
||||||
ID: uuid.New(),
|
ID: uuid.New(),
|
||||||
MerchantID: uuid.MustParse(MERCHANTID),
|
MerchantID: uuid.MustParse(MERCHANTID),
|
||||||
|
ProductTypeID: 1,
|
||||||
Name: util.RandomString(5),
|
Name: util.RandomString(5),
|
||||||
SellingPrice: util.RandomFloat(1000, 99999),
|
SellingPrice: util.RandomFloat(1000, 99999),
|
||||||
PurchasePrice: util.RandomFloat(999, 9999),
|
PurchasePrice: util.RandomFloat(999, 9999),
|
||||||
|
Loading…
Reference in New Issue
Block a user