2017-01-03 19:26:51 +01:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
|
|
|
|
class Location(models.Model):
|
|
|
|
name = models.CharField(max_length=30, unique=True)
|
|
|
|
|
2017-01-03 20:13:47 +01:00
|
|
|
|
2017-01-03 19:26:51 +01:00
|
|
|
class Client(models.Model):
|
|
|
|
id = models.UUIDField(primary_key=True, editable=False)
|
|
|
|
location = models.ForeignKey(Location)
|
|
|
|
|
2017-01-03 20:13:47 +01:00
|
|
|
|
2017-01-03 19:26:51 +01:00
|
|
|
class Table(models.Model):
|
|
|
|
client = models.ForeignKey(Client)
|
|
|
|
number = models.IntegerField()
|
|
|
|
name = models.CharField(max_length=30)
|