add EV_USR_SEND_VP

This commit is contained in:
Cayo Puigdefabregas 2024-01-21 13:45:34 +01:00
parent baee7ba135
commit b63060ad31

View file

@ -52,6 +52,7 @@ class Event(models.Model):
EV_ORG_DID_DELETED_BY_ADMIN = 28, "Organisational DID deleted by admin"
EV_USR_DEACTIVATED_BY_ADMIN = 29, "User deactivated"
EV_USR_ACTIVATED_BY_ADMIN = 30, "User activated"
EV_USR_SEND_VP = 31, "User send Verificable Presentation"
created = models.DateTimeField(_("Date"), auto_now=True)
message = models.CharField(_("Description"), max_length=350)
@ -408,6 +409,14 @@ class Event(models.Model):
message=msg,
)
@classmethod
def set_EV_USR_SEND_VP(cls, msg, user):
cls.objects.create(
type=cls.Types.EV_USR_SEND_VP,
message=msg,
user=user
)
class DID(models.Model):
class Types(models.IntegerChoices):