hyperswitch
hyperswitch copied to clipboard
[REFACTOR] Consolidate `UserStatus` Enum into `common_enums` File
Feature Description
We currently have duplicate UserStatus
enum types defined in multiple locations:
-
crates/api_models/src/user_role.rs
-
crates/diesel_models/src/enums.rs
To avoid redundancy and ensure consistency, these types should be centralized in the common enums file: crates/common_enums/src/enums.rs
. This will make it easier to manage and maintain the UserStatus enum across the codebase.
Possible Implementation
Task
- Move the
UserStatus
enum from bothcrates/api_models/src/user_role.rs
andcrates/diesel_models/src/enums.rs
tocrates/common_enums/src/enums.rs
. - Update all references to
UserStatus
in the codebase to point to the new location in the common enums file.
Steps to Complete
- Open the
crates/api_models/src/user_role.rs
file and locate theUserStatus
enum. - Open the
crates/diesel_models/src/enums.rs
file and locate the otherUserStatus
enum. - Move the definition of
UserStatus
fromdiesel_models
file intocrates/common_enums/src/enums.rs
. - Update all imports or references to
UserStatus
in bothapi_models
anddiesel_models
to use the centralized definition fromcommon_enums
. - Ensure all code compiles correctly after the changes.
Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
Submission Process:
- Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
- Once assigned, submit a pull request (PR).
- Maintainers will review and provide feedback, if any.
- Maintainers can unassign issues due to inactivity, read more here.
Refer here for Terms and conditions for the contest.