Now stores player's roles in their corporation

This commit is contained in:
2010-09-11 19:16:46 +01:00
parent 67be0fa88b
commit 5b3813a9bb
5 changed files with 299 additions and 3 deletions

View File

@@ -86,6 +86,9 @@ class EVEPlayerCharacter(EVEAPIModel):
director = models.BooleanField(blank=False, default=False,
verbose_name="Director",
help_text="This character is a Director of the associated corporation")
roles = models.ManyToManyField("EVEPlayerCharacterRole", blank=True,
null=True)
objects = EVEPlayerCharacterManager()
@@ -103,6 +106,18 @@ class EVEPlayerCharacter(EVEAPIModel):
verbose_name = 'Player Character'
verbose_name_plural = 'Player Characters'
class EVEPlayerCharacterRole(EVEAPIModel):
"""
Represents a role which can be applied to a character
"""
name = models.CharField(max_length=255, blank=False, null=False)
class Meta:
app_label = 'eve_api'
verbose_name = 'Player Role'
verbose_name_plural = 'Player Roles'
class EVEPlayerAlliance(EVEAPIModel):
"""
Represents a player-controlled alliance. Updated from the alliance