19 lines
No EOL
648 B
Python
19 lines
No EOL
648 B
Python
from django.contrib.gis.db import models
|
|
|
|
from localauth.models import User, Profile, LocationMixin
|
|
|
|
from django_countries.fields import CountryField
|
|
|
|
class PartnerProfile(Profile):
|
|
pass
|
|
|
|
class Establishment(LocationMixin, models.Model):
|
|
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(models.Model):
|
|
establishment = models.ForeignKey(Establishment, models.CASCADE)
|
|
name = models.CharField(max_length=64) |