2021-03-24 06:43:05 +00:00
|
|
|
from django.contrib.gis.db import models
|
2021-03-01 09:56:10 +00:00
|
|
|
|
2021-03-22 17:42:07 +00:00
|
|
|
from localauth.models import User, Profile
|
|
|
|
|
|
|
|
from django_countries.fields import CountryField
|
|
|
|
|
|
|
|
class PartnerProfile(Profile):
|
|
|
|
pass
|
|
|
|
|
|
|
|
class Establishment(models.Model):
|
|
|
|
owner = models.ForeignKey(PartnerProfile, models.CASCADE)
|
|
|
|
name = models.CharField(max_length=64)
|
|
|
|
stars = models.IntegerField(null=True, blank=True)
|
|
|
|
street = models.CharField(max_length=64)
|
|
|
|
city = models.CharField(max_length=64)
|
|
|
|
zip = models.CharField(max_length=16)
|
|
|
|
state = models.CharField(max_length=64)
|
|
|
|
country = CountryField()
|
2021-03-24 06:43:05 +00:00
|
|
|
coords = models.PointField()
|
2021-04-09 05:18:21 +00:00
|
|
|
verified = models.BooleanField(default=False)
|
2021-03-22 17:42:07 +00:00
|
|
|
|
|
|
|
class RoomCategory(models.Model):
|
|
|
|
establishment = models.ForeignKey(Establishment, models.CASCADE)
|
|
|
|
name = models.CharField(max_length=64)
|