As a future improvement:
Currently, the nominations are handled according to their associated category's type:
- If the category is a
ONE_USER category, then mainNominee is required and must be a reference to a user id, auxNominee must NOT be present, and extra may be present
- If the category is a
TWO_USERS category, then mainNominee and auxNominee are required and must be references to user ids, and extra may be present
- If the category is a
ONLY_EXTRA category, then extra is required and its content will vary depending on the referenced category
A possible improvement, as discussed by Germán and me, would be to only have two types:
And change the nominees field to an array of foreign keys to user, using the fact that postgresql allows for array types.
This goes beyond the reach of Compushow 2019 but would be nice to have for other years, should the project be reused in the future.
As a future improvement:
Currently, the nominations are handled according to their associated category's type:
ONE_USERcategory, thenmainNomineeis required and must be a reference to auserid,auxNomineemust NOT be present, andextramay be presentTWO_USERScategory, thenmainNomineeandauxNomineeare required and must be references touserids, andextramay be presentONLY_EXTRAcategory, thenextrais required and its content will vary depending on the referenced categoryA possible improvement, as discussed by Germán and me, would be to only have two types:
USERSEXTRAAnd change the
nomineesfield to an array of foreign keys to user, using the fact that postgresql allows for array types.This goes beyond the reach of Compushow 2019 but would be nice to have for other years, should the project be reused in the future.