bestSMS/best/new_best/models.py

158 lines
5.3 KiB
Python
Raw Normal View History

2011-07-16 06:11:20 +00:00
# This is an auto-generated Django model module.
# You'll have to do the following manually to clean this up:
# * Rearrange models' order
# * Make sure each model has one field with primary_key=True
# Feel free to rename the models, but don't rename db_table values or field names.
#
# Also note: You'll have to insert the output of 'django-admin.py sqlcustom [appname]'
# into your database.
from django.db import models
class Acexpressroutes(models.Model):
routecode = models.CharField(max_length=512)
stopserial = models.IntegerField()
stageno = models.IntegerField()
stopcode = models.ForeignKey('Stopmaster', db_column='stopcode')
stage = models.CharField(max_length=512)
km = models.FloatField()
stopname = models.CharField(max_length=512)
class Meta:
db_table = u'acexpressroutes'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.routecode
2011-07-16 06:11:20 +00:00
class Atlas(models.Model):
routecode = models.CharField(max_length=512)
route = models.CharField(max_length=512)
busfrom = models.CharField(max_length=512)
firstfrom = models.CharField(max_length=512)
lastfrom = models.CharField(max_length=512)
busto = models.CharField(max_length=512)
firstto = models.CharField(max_length=512)
lastto = models.CharField(max_length=512)
routespan = models.CharField(max_length=512)
runtime7to11 = models.CharField(max_length=512)
runtime11to17 = models.CharField(max_length=512)
runtime17toend = models.CharField(max_length=512)
runtimenight = models.CharField(max_length=512)
headwaybefore7 = models.CharField(max_length=512)
headway7to11 = models.CharField(max_length=512)
headway11to17 = models.CharField(max_length=512)
headway17to20 = models.CharField(max_length=512)
headway20tolast = models.CharField(max_length=512)
reliefpoint = models.CharField(max_length=512)
traveltime = models.CharField(max_length=512)
scheduletype = models.CharField(max_length=512)
id = models.IntegerField(unique=True, primary_key=True)
class Meta:
db_table = u'atlas'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.route
2011-07-16 06:11:20 +00:00
class Regularroutes(models.Model):
routecode = models.CharField(max_length=512)
stopserial = models.IntegerField()
stageno = models.IntegerField()
stopcode = models.ForeignKey('Stopmaster', db_column='stopcode')
stage = models.CharField(max_length=512)
km = models.FloatField()
stopname = models.CharField(max_length=512)
class Meta:
db_table = u'regularroutes'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.routecode
2011-07-16 06:11:20 +00:00
class Routetype(models.Model):
typenumber = models.IntegerField()
routetype = models.CharField(max_length=512)
class Meta:
db_table = u'routetype'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.routetype
2011-07-16 06:11:20 +00:00
class Stopmaster(models.Model):
2011-07-16 13:26:27 +00:00
stopcode = models.IntegerField(unique=True, primary_key=True)
2011-07-16 06:11:20 +00:00
stopname = models.CharField(max_length=512)
areacode = models.ForeignKey('Areamaster', db_column='areacode')
displayname = models.CharField(max_length=512)
smlength = models.IntegerField()
class Meta:
db_table = u'stopmaster'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.stopname
2011-07-16 06:11:20 +00:00
class Areamaster(models.Model):
2011-07-16 13:26:27 +00:00
areacode = models.IntegerField(unique=True, primary_key=True)
2011-07-16 06:11:20 +00:00
areaname = models.CharField(max_length=512)
class Meta:
db_table = u'areamaster'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.areaname
2011-07-16 06:11:20 +00:00
class Asroutes(models.Model):
routecode = models.CharField(max_length=512)
stopserial = models.IntegerField()
stageno = models.IntegerField()
stopcode = models.ForeignKey('Stopmaster', db_column='stopcode')
stage = models.CharField(max_length=512)
km = models.FloatField()
stopname = models.CharField(max_length=512)
class Meta:
db_table = u'asroutes'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.routecode
2011-07-16 06:11:20 +00:00
class Expressroutes(models.Model):
routecode = models.CharField(max_length=512)
stopserial = models.IntegerField()
stageno = models.IntegerField()
stopcode = models.ForeignKey('Stopmaster', db_column='stopcode')
stage = models.CharField(max_length=512)
km = models.FloatField()
stopname = models.CharField(max_length=512)
class Meta:
db_table = u'expressroutes'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.routecode
2011-07-16 06:11:20 +00:00
class LocationsPoint(models.Model):
id = models.IntegerField(primary_key=True)
latitude = models.DecimalField(max_digits=13, decimal_places=10)
longitude = models.DecimalField(max_digits=13, decimal_places=10)
class Meta:
db_table = u'locations_point'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return str(self.id)
2011-07-16 06:11:20 +00:00
class LocationsLocationtype(models.Model):
name = models.CharField(max_length=100)
slug = models.CharField(max_length=50, primary_key=True)
class Meta:
db_table = u'locations_locationtype'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return self.name
2011-07-16 06:11:20 +00:00
class LocationsLocation(models.Model):
id = models.IntegerField(primary_key=True)
point = models.ForeignKey(LocationsPoint)
type = models.ForeignKey(LocationsLocationtype)
# parent_type = models.ForeignKey(DjangoContentType)
parent_id = models.IntegerField()
class Meta:
db_table = u'locations_location'
2011-07-16 13:26:27 +00:00
def __unicode__(self):
return str(self.id)