Sistema_Gestion_Transporte/project/api/models.py

58 lines
2.4 KiB
Python
Raw Normal View History

2023-06-03 17:19:58 -04: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
# * Make sure each ForeignKey and OneToOneField has `on_delete` set to the desired behavior
# * Remove `managed = False` lines if you wish to allow Django to create, modify, and delete the table
# Feel free to rename the models, but don't rename db_table values or field names.
from django.db import models
class Agency(models.Model):
id = models.BigAutoField(primary_key=True)
agency_id = models.CharField(max_length=50)
agency_name = models.CharField(max_length=50)
agency_url = models.CharField(max_length=200)
agency_timezone = models.CharField(max_length=20)
agency_lang = models.CharField(max_length=10, blank=True, null=True)
agency_phone = models.CharField(max_length=20, blank=True, null=True)
agency_fare_url = models.CharField(max_length=255, blank=True, null=True)
agency_email = models.CharField(max_length=255, blank=True, null=True)
project = models.ForeignKey('Project', models.DO_NOTHING)
class Meta:
managed = False
db_table = 'agencies'
unique_together = (('project', 'agency_id'),)
verbose_name = 'Agencia'
verbose_name_plural = 'Agencias'
class Project(models.Model):
project_id = models.AutoField(primary_key=True)
project_name = models.CharField(max_length=50)
class Meta:
managed = False
db_table = 'projects'
verbose_name = 'Proyecto'
verbose_name_plural = 'Proyectos'
class Route(models.Model):
id = models.BigAutoField(primary_key=True)
route_id = models.CharField(max_length=50)
route_short_name = models.CharField(max_length=50, blank=True, null=True)
route_long_name = models.CharField(max_length=200, blank=True, null=True)
route_desc = models.CharField(max_length=50, blank=True, null=True)
route_type = models.IntegerField()
route_url = models.CharField(max_length=200, blank=True, null=True)
route_color = models.CharField(max_length=10, blank=True, null=True)
route_text_color = models.CharField(max_length=10, blank=True, null=True)
agency = models.ForeignKey(Agency, models.DO_NOTHING)
class Meta:
managed = False
db_table = 'routes'
verbose_name = 'Ruta'
verbose_name_plural = 'Rutas'