diff --git a/back/tgbot/models.py b/back/tgbot/models.py index a09dc0e..29196b4 100644 --- a/back/tgbot/models.py +++ b/back/tgbot/models.py @@ -1,7 +1,7 @@ import uuid from django.db import models -from tmc.models import CustomTable, BaseCustomField +from tmc.models import CustomTable, BaseCustomField, TerritoryItem import logging @@ -37,6 +37,7 @@ class TgItem(models.Model): ) user_id = models.BigIntegerField() name = models.CharField(max_length=255) + location = models.ForeignKey(TerritoryItem, models.RESTRICT) created_at = models.DateTimeField(auto_now_add=True, null=True, blank=True) updated_at = models.DateTimeField(auto_now=True, null=True, blank=True) tmc = models.ManyToManyField(TmcElement)