This commit is contained in:
2025-11-13 02:32:56 +01:00
parent c39467dc7d
commit 5c3a02d282
10 changed files with 113 additions and 32 deletions

18
backend/thirdparty/zasilkovna/models.py vendored Normal file
View File

@@ -0,0 +1,18 @@
from django.db import models
# Create your models here.
class Zasilkovna(models.Model):
created_at = models.DateTimeField(auto_now_add=True)
packet_id = models.CharField(max_length=255, unique=True) # identifikátor od Packety
label_pdf = models.BinaryField(null=True, blank=True) # uložit PDF binárně nebo odkaz
status = models.CharField(max_length=50) # např. „created“, „in_transit“, „delivered“
cancelled = models.BooleanField(default=False)
metadata = models.JSONField(default=dict, blank=True) # pro případná extra data
def save(self, *args, **kwargs):
# případná logika před uložením
super().save(*args, **kwargs)