-
Notifications
You must be signed in to change notification settings - Fork 0
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
enums: refactor BorrowerDocumentType as document_type table #383
Comments
Enums with no associated logic (and that have demand for configurability) can be made into tables (and even associated with specific lenders, if e.g. not all document options should be available for applications to all lenders). This includes:
Another option, instead of putting these entirely in the DB, is to have a "main list" with all options as a enum, and then a Lender has a JSON field or similar to limit the options. (This option is only interesting if we want to change the least code.) Most enums are central to application logic, so they should probably remain enums:
Some related only to statistics, that are less important (but also less demand for configurability?):
|
Agree
Agree Right now we need to add a new document type for one lender, so I will prioritize this issue.
BorrowerSize is related to lender/credit products so it could be a good candidate for the table option |
After thinking more about this, I think we probably only need a document_type table, with a document description and name (and code). Currently, |
Sounds good to me! |
Following from #362 (comment) we could consider having a settings table where we put all the current enums instead of hard coding them. This is especially relevant for document types, as lenders can request for new types when they are onboarded. The table should be fine for now but in the future we could also consider adding a form on the OCP admin page for managing settings.
The text was updated successfully, but these errors were encountered: