ABCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
1
TableAttributeData TypeNullPKFKUniqueOther ConstraintsDescription
2
usersAn individual user in the system
3
idINTNYAUTO_INCREMENTThe ID associated with the user
4
first_nameVARCHAR(50)YThe user's first name
5
last_nameVARCHAR(50)YThe user's last name
6
nicknameVARCHAR(50)YThe user's nick name
7
nickname_is_flaggedTINYINTNIndicates if another user flagged the user's nickname. 0=not flagged, 1=flagged. Defaults to 0.
8
nickname_status_idINTNstatus.idThe message's status: active, inactive, violation
9
emailVARCHAR(255)NYThe user's unique email address. Critical for fast login lookups.
10
public_emailTINYINTNWhether the user wants their email address visible to others at their school. 0=no, 1=yes. Default 0.
11
phoneVARCHAR(255)YThe user's phone number
12
public_phoneTINYINTYWhether the user wants their phone number visible to others at their school. 0=no, 1=yes. Default 0.
13
password_hashVARCHAR(255)YThe user's hashed password
14
avatar_urlVARCHAR(255)YAn optional user avatar
15
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the user signed up.
16
updated_atDATETIMENCURRENT_TIMESTAMPThe date and time the user account was last updated.
17
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the user account was deleted.
18
INDEX(first_name, last_name)Administrators will frequently search for students by name.
19
UNIQUE_INDEX(email)Critical for fast logins and preventing duplicate accounts.
20
21
user_rolesA role assigned to a user
22
user_idINTNYusers.idThe ID associated with the user
23
role_idINTNYroles.idThe ID associated with the role
24
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the user role was created.
25
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the user role was deleted.
26
27
rolesA role in the system
28
idINTNYAUTO_INCREMENTThe ID associated with an available role.
29
nameVARCHAR(50)NThe name of the role.
30
descriptionVARCHAR(255)NThe description of the role.
31
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the role was created.
32
updated_atDATETIMENCURRENT_TIMESTAMPThe date and time the role was last updated.
33
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the role was deleted.
34
35
role_permissionsA permission assigned to a role
36
role_idINTNYroles.idThe ID associated with the role
37
permission_idINTNYpermissions.idThe ID associated with the permission
38
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the role's permission was created.
39
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the role was deleted.
40
41
permissionsA permission to be assigned to a role
42
idINTNYAUTO_INCREMENTThe ID associated with an available permission.
43
nameVARCHAR(50)NThe name of the permission.
44
descriptionVARCHAR(255)NThe description of the permission.
45
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the permission was created.
46
updated_atDATETIMENCURRENT_TIMESTAMPThe date and time the permission was last updated.
47
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the permission was deleted.
48
49
statusStatuses of things
50
idINTNYAUTO_INCREMENTThe ID of the status
51
nameVARCHAR(255)NThe name of the status
52
53
schoolsColleges and Universities that have an Athleagues subscription
54
idINTNYAUTO_INCREMENTThe ID associated with the school
55
nameVARCHAR(255)NThe name for the school.
56
domainVARCHAR(255)NYThe school's domain, used for user registration.
57
status_idINTNstatus.idThe school's status: active, inactive, suspended
58
logo_urlVARCHAR(255)YAn optional school logo
59
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the school signed up.
60
updated_atDATETIMENCURRENT_TIMESTAMPThe date and time the school information was last updated.
61
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the school was deleted.
62
UNIQUE(domain)Ensures no two schools can claim the same email domain
63
64
subcriptionsAn available Athleagues subscription
65
idINTNYAUTO_INCREMENTThe ID associated with an available subscription.
66
nameVARCHAR(255)NThe name of the subscription.
67
descriptionTEXTNThe description of the subscription's features. Possibly contains HTML.
68
monthly_priceDECIMAL(7,2)NThe monthly price of the subscription.
69
annual_priceDECIMAL(10,2)NThe annual price of the subscription.
70
status_idINTNstatus.idThe school's status: draft, active, inactive
71
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the subscription was created.
72
updated_atDATETIMENCURRENT_TIMESTAMPThe date and time the subscription was last updated.
73
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the subscription was deleted.
74
75
school_subscriptionsA history of all active and inactive subscriptions
76
idINTNYAUTO_INCREMENTThe ID associated with a paid subscription.
77
school_idINTNschools.idThe ID associated with the school.
78
subscription_idINTNsubscriptions.idThe ID associated with the subscription.
79
payment_idVARCHAR(255)NThe ID assigned from the payment processor (like Authorize.net or Stripe)
80
payment_amountDECIMAL(10,2)NThe amount paid
81
typeENUMNWas the amount paid for a monthly or annual subscription.
82
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the subscription's payment was processed.
83
updated_atDATETIMENCURRENT_TIMESTAMPThe date and time the subscription payment was last updated.
84
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the subscription was deleted (refunded).
85
86
locationsA location for leagues and events.
87
idINTNYAUTO_INCREMENTThe ID associated with a location.
88
school_idINTNschools.idThe ID associated with the school.
89
parent_locationINTYlocations.idThe ID of a parent location (i.e. this location is Court 2, in Gymnasium 1)
90
nameVARCHAR(255)NThe name of the location.
91
descriptionTEXTYThe description of the location. Possibly contains HTML.
92
addressVARCHAR(255)YA physical address to the location. An address or latitude/longitude are required to generate a map.
93
latitudeDECIMAL(8,4)YThe latitude of the location. An address or latitude/longitude are required to generate a map
94
longitudeDECIMAL(8,4)YThe longitude of the location. An address or latitude/longitude are required to generate a map
95
status_idINTNstatus.idThe location's status: draft, active, temporarily closed, permanently closed, coming soon
96
image_urlVARCHAR(255)YAn optional image of the location
97
created_atDATETIMENCURRENT_TIMESTAMPThe date and time the location was created.
98
updated_atDATETIMENCURRENT_TIMESTAMPThe date and time the location was last updated.
99
deleted_atDATETIMEYCURRENT_TIMESTAMPThe date and time the location was deleted.
100