From 1f9e70e4232e58a178f1b3fed9c73c536fdd5207 Mon Sep 17 00:00:00 2001 From: Shwetabh Kumar Date: Wed, 29 Nov 2023 17:17:52 +0530 Subject: [PATCH] Fix: Replacing all strings with enums --- apps/fyle/enums.py | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 apps/fyle/enums.py diff --git a/apps/fyle/enums.py b/apps/fyle/enums.py new file mode 100644 index 00000000..ad3bb602 --- /dev/null +++ b/apps/fyle/enums.py @@ -0,0 +1,47 @@ +""" +This file contains all the enums used in the Fyle app +""" + +class FundSourceEnum: + """ + Enum for Fund Source + """ + PERSONAL = 'PERSONAL' + CCC = 'CCC' + + +class FyleAttributeEnum: + """ + Enum for Fyle Attributes + """ + CATEGORY = 'CATEGORY' + CATEGORY_DISPLAY = 'Category' + + PROJECT = 'PROJECT' + PROJECT_DISPLAY = 'Project' + + COST_CENTER = 'COST_CENTER' + COST_CENTER_DISPLAY = 'Cost Center' + + CORPORATE_CARD = 'CORPORATE_CARD' + CORPORATE_CARD_DISPLAY = 'Corporate Card' + + TAX_GROUP = 'TAX_GROUP' + TAX_GROUP_DISPLAY = 'Tax Group' + + +class ExpenseStateEnum: + """ + Enum for Expense State + """ + APPROVED = 'APPROVED' + PAYMENT_PROCESSING = 'PAYMENT_PROCESSING' + PAID = 'PAID' + + +class PlatformExpensesEnum: + """ + Enum for Platform Expenses + """ + PERSONAL_CASH_ACCOUNT = 'PERSONAL_CASH_ACCOUNT' + PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT = 'PERSONAL_CORPORATE_CREDIT_CARD_ACCOUNT'