JourneyJoker/partners/models.py

22 lines
709 B
Python
Raw Normal View History

2021-03-01 09:56:10 +00:00
from django.db import models
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()
class RoomCategory(models.Model):
establishment = models.ForeignKey(Establishment, models.CASCADE)
name = models.CharField(max_length=64)