mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Reorganise the file structure into a project tree
This commit is contained in:
64
app/eve_api/models/static.py
Normal file
64
app/eve_api/models/static.py
Normal file
@@ -0,0 +1,64 @@
|
||||
"""
|
||||
This file covers any static information from the EVE data dumps. While
|
||||
using django-evedb would be a smarter choice, for the limited subset of
|
||||
data we're using it isn't worth the overhead
|
||||
"""
|
||||
|
||||
from django.db import models
|
||||
|
||||
|
||||
class EVESkill(models.Model):
|
||||
""" Represents a skill in EVE Online """
|
||||
|
||||
name = models.CharField(blank=True, max_length=255)
|
||||
group = models.ForeignKey('eve_api.EVESkillGroup', null=True)
|
||||
description = models.TextField(blank=True)
|
||||
|
||||
def __unicode__(self):
|
||||
if self.name:
|
||||
return self.name
|
||||
else:
|
||||
return u"Skill %d" % self.id
|
||||
|
||||
class Meta:
|
||||
app_label = 'eve_api'
|
||||
verbose_name = 'Character Skill'
|
||||
verbose_name_plural = 'Character Skills'
|
||||
|
||||
|
||||
class EVESkillGroup(models.Model):
|
||||
""" Represents a skill group in EVE Online """
|
||||
|
||||
name = models.CharField(blank=True, max_length=255)
|
||||
|
||||
def __unicode__(self):
|
||||
if self.name:
|
||||
return self.name
|
||||
else:
|
||||
return u"Skill Group %d" % self.id
|
||||
|
||||
class Meta:
|
||||
app_label = 'eve_api'
|
||||
verbose_name = 'Character Skill Group'
|
||||
verbose_name_plural = 'Character Skill Groups'
|
||||
|
||||
|
||||
class EVEPlayerCharacterRole(models.Model):
|
||||
"""
|
||||
Represents a role which can be applied to a character
|
||||
"""
|
||||
|
||||
roleid = models.CharField(max_length=64, blank=False, null=False)
|
||||
name = models.CharField(max_length=255, blank=False, null=False)
|
||||
|
||||
def __unicode__(self):
|
||||
if self.name:
|
||||
return self.name
|
||||
else:
|
||||
return u"Role %d" % self.id
|
||||
|
||||
class Meta:
|
||||
app_label = 'eve_api'
|
||||
verbose_name = 'Character Role'
|
||||
verbose_name_plural = 'Character Roles'
|
||||
|
||||
Reference in New Issue
Block a user