Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use enum instead of number for user-type #62

Open
2 tasks
shubham1172 opened this issue Jan 8, 2020 · 0 comments
Open
2 tasks

Use enum instead of number for user-type #62

shubham1172 opened this issue Jan 8, 2020 · 0 comments
Labels
backend Back-end job good first issue Good for newcomers help wanted Extra attention is needed priority:low Low priority task

Comments

@shubham1172
Copy link
Member

shubham1172 commented Jan 8, 2020

To-do

We are using numbers (0,1,2) to represent user-type throughout our code. This can be ambiguous and confusing for developers. Instead, let's use an enum type - TYPE_ADMIN, TYPE_EB, TYPE_USER, etc. Let's have these enums in the user model itself and translate them to numbers for using with Mongo.

Checklist

  • Change the model
  • Change all occurrences in code
@shubham1172 shubham1172 added backend Back-end job good first issue Good for newcomers help wanted Extra attention is needed priority:low Low priority task labels Jan 8, 2020
@shubham1172 shubham1172 added backend Back-end job good first issue Good for newcomers help wanted Extra attention is needed priority:low Low priority task labels Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Back-end job good first issue Good for newcomers help wanted Extra attention is needed priority:low Low priority task
Projects
None yet
Development

No branches or pull requests

1 participant