Restoroo/core/models/businesses.py
2022-08-04 17:58:57 +02:00

25 lines
757 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from django.db import models
from .media import Image
from .geo import Location
class Chain(models.Model):
'''
Model for "Restaurant Chains"
Each Restaurant belongs to a Chain just in case any large corporation
running several different chains comes around...
'''
name = models.CharField(max_length=128)
logo = models.ForeignKey(Image, models.PROTECT, null=True)
class Restaurant(models.Model):
'''
Model representing an individual Restaurant within a Chain
'''
name = models.CharField(max_length=128)
logo = models.ForeignKey(Image, models.PROTECT, null=True)
location = models.ForeignKey(Location, models.PROTECT)
maximum_capacity = models.PositiveSmallIntegerField(null=True, blank=True)