<commit_before>from django.contrib.auth.models import User
from django.conf import settings
from django.core.urlresolvers import reverse
import datetime
from django.utils import timezone

from django.db import models
from django.contrib.gis.db import models
from django.contrib.gis.geos import LineString, Point

Tijuana = Point(-117.0382, 32.5149, srid=4326)
DefaultRoute = LineString((0, 0), (1, 1), srid=4326)

# Create your models here.

class Status(models.Model):
    name = models.CharField(max_length=254, unique=True, default="")

    def __str__(self):
        return "{}".format(self.name)

class TrackableDevice(models.Model):
    device_id = models.CharField(max_length=254, primary_key=True)
    location = models.PointField(srid=4326, default=Tijuana)

class Capabilities(models.Model):
    name = models.CharField(max_length=254, unique=True)
    def __str__(self):
        return "{}".format(self.name)

class Ambulances(models.Model):
    license_plate = models.CharField(max_length=254)
    name = models.CharField(max_length=254, default="")

    status = models.ForeignKey(Status, on_delete=models.CASCADE, default=1)
    location = models.PointField(srid=4326, default=Tijuana)
    orientation = models.FloatField(null=True)
    # device = models.OneToOneField(TrackableDevice, blank=True, null=True)
    priority = models.CharField(max_length=254, default="High")
    capability = models.ForeignKey(Capabilities, on_delete=models.CASCADE, null=True, blank=True)

    def __str__(self):
        return "{}: ({}), {}".format(self.license_plate,
                                     self.status,
                                     self.location)

class Call(models.Model):
    id = models.AutoField(primary_key=True, default="1")
    name = models.CharField(max_length=254, default = "")
    # address-related info
    residential_unit = models.CharField(max_length=254, default = "None")
    stmain_number = models.CharField(max_length=254, default = "None")
    delegation = models.CharField(max_length=254, default = "None")
    zipcode = models.CharField(max_length=254, default = "22500")
    city = models.CharField(max_length=254, default="Tijuana")
    state = models.CharField(max_length=254, default="Baja California")
    location = models.PointField(srid=4326, default=Tijuana)
    # assignment = base name and #
    assignment = models.CharField(max_length=254, default = "None")
    # short description of the patient's injury
    description = models.CharField(max_length=500, default = "None")
    # ambulance assigned to Call<commit_msg>Autoincrement id for calls fix<commit_after>from django.contrib.auth.models import User
from django.conf import settings
from django.core.urlresolvers import reverse
import datetime
from django.utils import timezone

from django.db import models
from django.contrib.gis.db import models
from django.contrib.gis.geos import LineString, Point

Tijuana = Point(-117.0382, 32.5149, srid=4326)
DefaultRoute = LineString((0, 0), (1, 1), srid=4326)

# Create your models here.

class Status(models.Model):
    name = models.CharField(max_length=254, unique=True, default="")

    def __str__(self):
        return "{}".format(self.name)

class TrackableDevice(models.Model):
    device_id = models.CharField(max_length=254, primary_key=True)
    location = models.PointField(srid=4326, default=Tijuana)

class Capabilities(models.Model):
    name = models.CharField(max_length=254, unique=True)
    def __str__(self):
        return "{}".format(self.name)

class Ambulances(models.Model):
    license_plate = models.CharField(max_length=254)
    name = models.CharField(max_length=254, default="")

    status = models.ForeignKey(Status, on_delete=models.CASCADE, default=1)
    location = models.PointField(srid=4326, default=Tijuana)
    orientation = models.FloatField(null=True)
    # device = models.OneToOneField(TrackableDevice, blank=True, null=True)
    priority = models.CharField(max_length=254, default="High")
    capability = models.ForeignKey(Capabilities, on_delete=models.CASCADE, null=True, blank=True)

    def __str__(self):
        return "{}: ({}), {}".format(self.license_plate,
                                     self.status,
                                     self.location)

class Call(models.Model):
    name = models.CharField(max_length=254, default = "")
    # address-related info
    residential_unit = models.CharField(max_length=254, default = "None")
    stmain_number = models.CharField(max_length=254, default = "None")
    delegation = models.CharField(max_length=254, default = "None")
    zipcode = models.CharField(max_length=254, default = "22500")
    city = models.CharField(max_length=254, default="Tijuana")
    state = models.CharField(max_length=254, default="Baja California")
    location = models.PointField(srid=4326, default=Tijuana)
    # assignment = base name and #
    assignment = models.CharField(max_length=254, default = "None")
    # short description of the patient's injury
    description = models.CharField(max_length=500, default = "None")
    # ambulance assigned to Call
{'fraction_non_alphanumeric': 0.1183489827856025, 'fraction_numerical': 0.034624413145539906, 'mean_word_length': 4.21734693877551, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1049092', 'n_tokens_mistral': 1672, 'n_tokens_neox': 1559, 'n_words': 328}