import uuid from django.db import models from django_softdelete.models import SoftDeleteModel, SoftDeleteManager from inventory.models import Item from tickets.models import IssueThread class Shipment(SoftDeleteModel): id = models.AutoField(primary_key=True) public_secret = models.UUIDField(default = uuid.uuid4) related_items = models.ManyToManyField(Item) related_tickets = models.ManyToManyField(IssueThread) created_at = models.DateTimeField(null=True, auto_now_add=True) updated_at = models.DateTimeField(blank=True, null=True) all_objects = models.Manager() def __str__(self): return '[' + str(self.id) + ']' + self.description