Repository navigation
Updated the Rankings and Submission Schemas - #28
Conversation
|
These schema changes are intended to support submission-driven ranking history and manual admin point adjustments. A ranking stores the ordered team placements and may have no associated submission when it comes from a manual adjustment. When an approval or manual point change alters team placement, we plan to record a new ranking; otherwise, we won’t create one. |
wasiddiqui-glitch
left a comment
There was a problem hiding this comment.
Everything looks good!
thyndoan
left a comment
There was a problem hiding this comment.
Other than that, I think everything looks great!
…model dependency order and modified the schemas
wasiddiqui-glitch
left a comment
There was a problem hiding this comment.
I think after the previous fix, everything looks good!
…ferent reviewedAt dates
thyndoan
left a comment
There was a problem hiding this comment.
Thank you for all the updates. I check and it looks good!
Changes
Updated the rankings, the submission, and the team models.
Rankings:
Made it have a
sourcefield to indicate if the ranking was created due to a submission being approved or the admin changing the points of a team. Also made it have asubmissionfield as it was required to display the photos and the title of a corresponding ranking's submission.Submission:
Made it have a
tagsfield for the tags that appear in the photos, apvpHandlingfield to store whether or not the user decided to assign PVP points to a team, andreviewedAtto sort the rankings in the history page in the order in which they were reviewed.Team:
Added a
isPVPfield and added rules to make it be unique in the database to identify the PVP team not by name but rather by flag. This impacts the way the ranks, admin, and submission form pages identify the PVP team.Also updated the data.ts file to match the new schema form including its types and its objects.
Deleted the 4 previous scripts and created a new script called seed.ts which populates the entiry database, respecting the dependency order that the 4 populated models have.