Skip to content

Commit

Permalink
player models comments added
Browse files Browse the repository at this point in the history
  • Loading branch information
bzhang63 committed Apr 26, 2012
1 parent 78dd860 commit ee93415
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions 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)
Expand Down

0 comments on commit ee93415

Please sign in to comment.