MLH-Fellowship / fellow-central

Earn points for yourself and your pod during the MLH Fellowship. Make your activities and participation count.
https://leagueoffellow.netlify.app/
MIT License
6 stars 1 forks source link

Point Data Model #18

Closed cqvu closed 3 years ago

cqvu commented 3 years ago

Task(s)

Acceptance Criteria

Dependencies

13

Resources

Notes

luiszugasti commented 3 years ago

Wonder if it would be overkill to have a "description" table that just acts as an enumeration of all possible descriptions for earning points

luiszugasti commented 3 years ago

I feel like a more concise data model for this would be:

So finally:

cqvu commented 3 years ago

I feel like a more concise data model for this would be:

  • Assignee (foreign key reference to "User" table)
  • Event (foreign key reference to "Event" table)
  • TimeStamp (Ok - we can keep this for auditing purposes, and then check if a points entry is valid by referencing Event -> StartTime, EndTime. Otherwise, it's redundant)
  • Get rid of Amount, Description (Since we can just reference Event when doing a db lookup, this is just redundancy).

So finally:

  • Assignee,
  • Event,
  • TimeStamp

These Points represent points earned by fellows. They don't necessarily need to be associated with an Event because fellows can earn points through other means (discord activity, manual input from admins, winning hackathons, etc...).

We can have an Event field, can potentially be useful to track attendees? But regardless I think we would still need Amount, Timestamp, and Description

@PawanKolhe @boyuan12 Can y'all confirm?

PawanKolhe commented 3 years ago

Yep. we definitely need the amount field on the point. As cqvu said, there are many ways to earn points, attending events is just one way to earn points. Points wouldn't necessarily have an event attached. So we don't need the event field on points in my opinion.

luiszugasti commented 3 years ago

Hmm true, i overlooked that consideration we were making! Alright then Event wont have to be a foreign key, and description can be optional (only add a description if there is no associated event)