devicehub-django/dpp/models.py

16 lines
589 B
Python
Raw Normal View History

2024-11-15 17:56:11 +00:00
from django.db import models
from user.models import User, Institution
from utils.constants import STR_EXTEND_SIZE
# Create your models here.
class Proof(models.Model):
## The signature can be a phid or dpp depending of type of Proof
2024-11-15 17:56:11 +00:00
timestamp = models.IntegerField()
uuid = models.UUIDField()
signature = models.CharField(max_length=STR_EXTEND_SIZE)
type = models.CharField(max_length=STR_EXTEND_SIZE)
issuer = models.ForeignKey(Institution, on_delete=models.CASCADE)
2024-11-15 17:56:11 +00:00
user = models.ForeignKey(
User, on_delete=models.SET_NULL, null=True, blank=True)