Restoroo/core/models/layout.py

15 lines
474 B
Python
Raw Permalink Normal View History

2022-08-04 15:58:57 +00:00
from django.db import models
from .businesses import Restaurant
class Room(models.Model):
restaurant = models.ForeignKey(Restaurant, models.CASCADE)
name = models.CharField(max_length=128)
maximum_capacity = models.PositiveSmallIntegerField(null=True, blank=True)
class Table(models.Model):
room = models.ForeignKey(Room, models.CASCADE)
number = models.CharField(max_length=64)
capacity = models.PositiveSmallIntegerField(null=True, blank=True)