2021-03-24 06:43:05 +00:00
|
|
|
from django.contrib.gis.db import models
|
2021-03-01 09:56:10 +00:00
|
|
|
|
2021-04-14 05:38:52 +00:00
|
|
|
from localauth.models import User, Profile, LocationMixin, ImageMixin, PhoneMixin
|
2021-03-22 17:42:07 +00:00
|
|
|
|
|
|
|
from django_countries.fields import CountryField
|
|
|
|
|
|
|
|
class PartnerProfile(Profile):
|
|
|
|
pass
|
|
|
|
|
2021-04-14 05:38:52 +00:00
|
|
|
class Establishment(LocationMixin, ImageMixin, PhoneMixin):
|
2021-03-22 17:42:07 +00:00
|
|
|
owner = models.ForeignKey(PartnerProfile, models.CASCADE)
|
|
|
|
name = models.CharField(max_length=64)
|
|
|
|
stars = models.IntegerField(null=True, blank=True)
|
2021-04-11 14:19:43 +00:00
|
|
|
superior = models.BooleanField(default=False)
|
2021-04-09 05:18:21 +00:00
|
|
|
verified = models.BooleanField(default=False)
|
2021-03-22 17:42:07 +00:00
|
|
|
|
2021-04-12 12:39:18 +00:00
|
|
|
class RoomCategory(ImageMixin):
|
2021-03-22 17:42:07 +00:00
|
|
|
establishment = models.ForeignKey(Establishment, models.CASCADE)
|
2021-04-12 12:39:18 +00:00
|
|
|
name = models.CharField(max_length=64)
|
|
|
|
price = models.DecimalField(max_digits=10, decimal_places=2)
|