feat: add product against categories #34

Merged
realaravinth merged 10 commits from add-product into master 2024-07-15 18:21:13 +05:30
Showing only changes of commit 79397b6b44 - Show all commits

View file

@ -17,6 +17,14 @@ impl From<SqlxError> for InventoryDBError {
let msg = err.message();
if msg.contains("cqrs_inventory_store_query_store_id_key") {
return Self::DuplicateStoreID;
} else if msg.contains("cqrs_inventory_store_query_product_id_key") {
return Self::DuplicateProductID;
} else if msg.contains("cqrs_inventory_store_query_category_id_key") {
return Self::DuplicateCategoryID;
} else if msg.contains("cqrs_inventory_product_query_name_key") {
return Self::DuplicateProductName;
} else if msg.contains("cqrs_inventory_category_query_name_key") {
return Self::DuplicateProductName;
} else if msg.contains("cqrs_inventory_store_query_name_key") {
return Self::DuplicateStoreName;
} else {