expephalon-demomodule/core/models/auth.py
Kumi 85fe13edcf Implemented TOTP
Implemented currencies and taxes
2020-05-22 18:13:23 +02:00

14 lines
522 B
Python

from django.db.models import Model, ForeignKey, CharField, DateTimeField, UUIDField, CASCADE
from django.contrib.auth import get_user_model
from uuid import uuid4
class LoginSession(Model):
uuid = UUIDField(default=uuid4, primary_key=True)
user = ForeignKey(get_user_model(), CASCADE)
creation = DateTimeField(auto_now_add=True)
class PWResetToken(Model):
token = UUIDField(default=uuid4, primary_key=True)
user = ForeignKey(get_user_model(), CASCADE)
creation = DateTimeField(auto_now_add=True)