not allow to delete category when other transaction is using it

This commit is contained in:
MaysWind
2020-12-14 00:23:07 +08:00
parent d2c1dcbdbd
commit 99c628cc8a
5 changed files with 27 additions and 5 deletions
+1
View File
@@ -9,4 +9,5 @@ var (
ErrParentTransactionCategoryNotFound = NewNormalError(NORMAL_SUBCATEGORY_CATEGORY, 3, http.StatusBadRequest, "parent transaction category not found")
ErrCannotAddToSecondaryTransactionCategory = NewNormalError(NORMAL_SUBCATEGORY_CATEGORY, 4, http.StatusBadRequest, "cannot add to secondary transaction category")
ErrCannotUsePrimaryCategoryForTransaction = NewNormalError(NORMAL_SUBCATEGORY_CATEGORY, 5, http.StatusBadRequest, "cannot use primary category for transaction category")
ErrTransactionCategoryInUseCannotBeDeleted = NewNormalError(NORMAL_SUBCATEGORY_CATEGORY, 6, http.StatusBadRequest, "transaction category is in use and cannot be deleted")
)