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

15 lines
No EOL
474 B
Python

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)