JourneyJoker/partners/models.py

20 lines
No EOL
721 B
Python

from django.contrib.gis.db import models
from localauth.models import User, Profile, LocationMixin, ImageMixin
from django_countries.fields import CountryField
class PartnerProfile(Profile):
pass
class Establishment(LocationMixin, ImageMixin):
owner = models.ForeignKey(PartnerProfile, models.CASCADE)
name = models.CharField(max_length=64)
stars = models.IntegerField(null=True, blank=True)
superior = models.BooleanField(default=False)
verified = models.BooleanField(default=False)
class RoomCategory(ImageMixin):
establishment = models.ForeignKey(Establishment, models.CASCADE)
name = models.CharField(max_length=64)
price = models.DecimalField(max_digits=10, decimal_places=2)