diff --git a/players/models.py b/players/models.py index 8b45c6b..557164d 100644 --- a/players/models.py +++ b/players/models.py @@ -1,15 +1,25 @@ from django.db import models -# Create your models here. - +#Teams Model +#Defines the Teams table +#name - holds the name of the team +#tag - holds the tag abreviation of the name class Team(models.Model): name = models.CharField("team name", max_length=255) tag = models.CharField("team tag", max_length=30) - # nevermind, just the top one is necessary players = models.OneToManyField(Player, verbose_name="team's players") def __unicode__(self): return self.name + " (" + self.tag + ")" - + +#Players Model +#Contains Players table with FK team to Team +#name - name of player +#handle - in-game name of player +#team - FK to Team +#picture - default null pic of player +#race - Terran/Zerg/Protoss +#ELO - Player ranking +#Nationality - home country class Player(models.Model): name = models.CharField("player's real name", max_length=255) handle = models.CharField("player's online handle", max_length=255)