Skip to content

Instantly share code, notes, and snippets.

@mekanix
Created November 10, 2013 14:09
Show Gist options
  • Save mekanix/7398749 to your computer and use it in GitHub Desktop.
Save mekanix/7398749 to your computer and use it in GitHub Desktop.
from django.db import models
class Applications(models.Model):
name = models.CharField(max_length=512)
class ContactInformation(models.Model):
contactName = models.CharField(max_length=512)
phoneNumber = models.CharField(max_length=20)
email = models.CharField(max_length=512)
primary = models.BooleanField()
class User(models.Model):
name = models.CharField(max_length=512)
isSchneiderUser = models.BooleanField()
isPALAdmin = models.BooleanField()
contactInformation = models.ForeignKey(ContactInformation)
class Roles(models.Model):
name = models.CharField(max_length=512)
class Module(models.Model):
name = models.CharField(max_length=512)
application = models.ForeignKey(Applications)
class ModuleToken(models.Model):
name = models.CharField(max_length=512)
module = models.ForeignKey(Module)
class Corporation(models.Model):
name = models.CharField(max_length=512)
contactInformation = models.ForeignKey(ContactInformation)
logo = models.ImageField(upload_to='logo')
class CorporationSite(models.Model):
corporation = models.ForeignKey(Corporation)
name = models.CharField(max_length=512)
contactInformation = models.ForeignKey(ContactInformation)
metricUnits = models.BooleanField()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment