# Path: runner/models.py
# class User(UserAbstract):
#     def __str__(self):
#         return self.name ;
#     class Meta:
#         managed = True
#         db_table = 'User'


from django.utils.encoding import python_2_unicode_compatible
from django.db import models, transaction
from runner.models import User
    contact = models.CharField(max_length=16, default='')
    address = models.CharField(max_length=100, default= '')
    available = models.BooleanField(default=True)
    image = models.ImageField(upload_to=get_employee_file, max_length='100', null=True)
    def __str__(self):
        return self.name

    class Meta:
        managed = True

@python_2_unicode_compatible
class Place(models.Model):
    id = models.AutoField(primary_key=True)  # Field name made lowercase.
    name = models.CharField(max_length=100, default='')  # Field name made lowercase.
    city = models.CharField(max_length=100, default='')  # Field name made lowercase.
    state = models.CharField(max_length=100, default='')
    pincode = models.CharField(max_length=16, default='')
    
    def __str__(self):
        return self.name+"-"+self.city

    def get_location(self):
        return self.name+" "+self.city+" "+self.state+" "+self.pincode
    
    class Meta:
        managed = True

@python_2_unicode_compatible
class Booking(models.Model):
    id = models.AutoField(primary_key=True)

# Path: runner/models.py
# class User(UserAbstract):
#     def __str__(self):
#         return self.name ;
#     class Meta:
#         managed = True
#         db_table = 'User'


# Path: taxi/models.py
from django.utils.encoding import python_2_unicode_compatible
from django.db import models, transaction
from runner.models import User

    contact = models.CharField(max_length=16, default='')
    address = models.CharField(max_length=100, default= '')
    available = models.BooleanField(default=True)
    image = models.ImageField(upload_to=get_employee_file, max_length='100', null=True)
    def __str__(self):
        return self.name

    class Meta:
        managed = True

@python_2_unicode_compatible
class Place(models.Model):
    id = models.AutoField(primary_key=True)  # Field name made lowercase.
    name = models.CharField(max_length=100, default='')  # Field name made lowercase.
    city = models.CharField(max_length=100, default='')  # Field name made lowercase.
    state = models.CharField(max_length=100, default='')
    pincode = models.CharField(max_length=16, default='')
    
    def __str__(self):
        return self.name+"-"+self.city

    def get_location(self):
        return self.name+" "+self.city+" "+self.state+" "+self.pincode
    
    class Meta:
        managed = True

@python_2_unicode_compatible
class Booking(models.Model):
    id = models.AutoField(primary_key=True)

    user = models.ForeignKey(User, models.DO_NOTHING, related_name='+')