названия
This commit is contained in:
parent
fa49de322d
commit
659e1ee439
|
@ -3,6 +3,7 @@ from django.db import models
|
|||
|
||||
class Partner(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
name = models.CharField(max_length=255)
|
||||
external_id = models.CharField()
|
||||
|
||||
def __str__(self):
|
||||
|
@ -11,6 +12,9 @@ class Partner(models.Model):
|
|||
|
||||
class InventoryItem(models.Model):
|
||||
id = models.AutoField(primary_key=True)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
name = models.CharField(max_length=255)
|
||||
partner = models.ForeignKey(
|
||||
Partner, related_name="Inventory", on_delete=models.CASCADE
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue