Data Model - AthensCommunitySoccer/MeteorBall GitHub Wiki

User (Meteor User)

Notes: 'has many players'

Players

Notes: 'belongs to user', 'has many team_memberships'

userId            ObjectId
name              String
bloodType         String
dateOfBirth       Date
emergencyContact  String
emergencyPhone    String
medicalConditions String
youth             Boolean

Team Memberships

Notes: 'has one team', 'has one player', 'has one season'

teamId       ObjectId (of a Team)
playerId     ObjectId (of a Player)
seasonId     ObjectId (of a Season)
role         String (e.g. 'captain', 'co-captain', 'player')

Teams

Notes: 'has many team_memberships', Stats?

creatorId  ObjectId (of a User) that is the captain
name       String
logoURL    String

Seasons

Notes:

name       String
startDate  Date
endDate    Date

League

Notes: 'has many teams', 'has many seasons'

name        String
seasonIds   Array of ObjectIds (of a Season)

Request

Notes:

requesterId   ObjectId (of a Player)
targetId      ObjectId (of a Player)
message       String
approved      Boolean
pending       Boolean

Payments

Notes:

playerId     ObjectId (of a Player)
seasonId     ObjectId (of a Season)
amount        Double