feat: Add timestamp to user registration model

Introduces a timestamp field to the UserRegistration model to
automatically capture the creation time of each entry. This helps
track and manage registration history more effectively.
This commit is contained in:
Kumi 2024-11-16 21:21:31 +01:00
parent 45425e650a
commit da40dbef85
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -23,6 +23,7 @@ class UserRegistration(models.Model):
status = models.IntegerField(choices=STATUS_CHOICES, default=STATUS_STARTED) status = models.IntegerField(choices=STATUS_CHOICES, default=STATUS_STARTED)
token = models.CharField(max_length=64, unique=True) token = models.CharField(max_length=64, unique=True)
email_verified = models.BooleanField(default=False) email_verified = models.BooleanField(default=False)
timestamp = models.DateTimeField(auto_now_add=True)
def __str__(self): def __str__(self):
return self.username return self.username