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):
|
2024-11-18 18:37:08 +00:00
|
|
|
## 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)
|
2024-11-18 18:37:08 +00:00
|
|
|
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)
|