2018-10-15 19:24:53 +00:00
|
|
|
from django.db import models
|
|
|
|
|
|
|
|
# Basic DB to correlate tokens, users and creation time
|
|
|
|
|
|
|
|
class ResetToken(models.Model):
|
|
|
|
|
|
|
|
# users wouldn't use usernames >100 chars
|
|
|
|
user = models.CharField(max_length=100)
|
|
|
|
# Not so sure about tokens, better make it big
|
|
|
|
# should be <100, but big usernames make bigger tokens
|
|
|
|
# if I read that correctly
|
|
|
|
token = models.CharField(max_length=255)
|
2018-10-16 18:25:50 +00:00
|
|
|
# creation time in epoch (UTC)
|
|
|
|
# BigInt just so we are save for the next few decades ;)
|
2018-10-15 19:24:53 +00:00
|
|
|
creation = models.BigIntegerField()
|