-
Notifications
You must be signed in to change notification settings - Fork 0
Tournaments ~ Tables.md
Riyush edited this page Nov 14, 2023
·
1 revision
- Columns
-
name
(string) PRIMARY KEY -
first_name
(string) -
last_name
(string) -
email
(string) -
username
(string) -
USERNAME_FIELD
(string) // Not sure what this is exactly but it's in existing model -
Required_Fields
(List) -
objects
(UserManager) - Constraints
- Unique:
username
,email
- Columns
-
TournmantID
(autoincrementing integer) PRIMARY KEY -
GameID
(int) referencesGame
(GameID
) -
Users
(ManytoManyField) -
Name
(string) -
StartDate
(datetime) -
EndDate
(datetime) -
MaxPlayers
(integer) -
Description
(string) -
Rules
(string) -
DrawRule
(string) - Constraints
- Unique:
TournamentID
- auto_now_add:
StartDate
,EndDate
- ManytoManyField:
Users
- Foreign Key:
GameID
- Columns
-
TournamentID
(int) -
UserID
(int) -
Status
(string, one of ('pending', 'approved', 'rejected')) - Constraints
-
TournamentID
,UserID
- Columns
-
MatchID
(autoincrementing integer) PRIMARY KEY -
TournamentID
(int) referencesTournament
(TournamentID
) -
Users
(ManytoManyField) referencesUser
(UserID
) -
MatchStatus
(string, one of ('Ongoing', 'Completed, 'Draw')) -
MatchStartDate
(datetime) -
MatchEndDate
(datetime) -
MatchDuration
(string) -
Score
(string) - Constraints
- Unique:
MatchID
- auto_now_add:
MatchStartDate
,MatchEndDate
- Foreign key:
TournamentID
- Columns
-
MatchID
(int) -
UserID
(int) referencesUser
(UserID
) -
Status
(string, one of ('Player', 'Spectator'))
- Columns
-
GameID
(autoincrementing integer) PRIMARY KEY -
GameName
(string)
- Columns:
-
NotificationID
(autoincrementing integer) PRIMARY KEY -
Content
(string) -
TimeStamp
(datetime) # DateTimeField with auto_now_add=True -
Visibility
(string, one of ('Spectators Only', 'Players Only', 'Both')) -
Users
(ManytoManyfield)
- Columns
-
NotificationID
(int) -
UserID
(int) -
Status
(string, one of ('Pending', 'Sent', 'Received'))
- Columns
-
ChatID
(autoincrementing integer) PRIMARY KEY -
MatchID
(OnetoOneField) referencesMatch
(MatchID
)
- Columns
-
MessageID
(autoincrementing integer) PRIMARY KEY -
ChatID
(int) referencesChat
(ChatID
) -
UserID
(int) referencesUser
(UserID
) -
Content
(string) -
TimeStamp
(datetime) # DateTimeField with auto_now_add=True - Constraints:
- Foreign Key:
ChatID
,UserID
-
Tournaments
-
Games
-
Matches
-
API
-
Forums
-
Users & Friending