foreign key
This commit is contained in:
parent
c0c6b4a285
commit
58994c596c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue