feat: add product against categories #34
1 changed files with 8 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue