commerce
This commit is contained in:
18
backend/thirdparty/zasilkovna/models.py
vendored
Normal file
18
backend/thirdparty/zasilkovna/models.py
vendored
Normal 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)
|
||||
Reference in New Issue
Block a user