freeleaps-service-hub/app/authentication/backend/models/models.py
2024-10-20 05:33:10 +00:00

38 lines
607 B
Python

from datetime import datetime
from beanie import Document
from .constants import AuthType
class UserPasswordDoc(Document):
user_id: str
password: str
class Settings:
name = "user_password"
class UserEmailDoc(Document):
user_id: str
email: str
class Settings:
name = "user_email"
class UserMobileDoc(Document):
user_id: str
mobile: str
class Settings:
name = "user_mobile"
class AuthCodeDoc(Document):
auth_code: str
method: str
method_type: AuthType
expiry: datetime
class Settings:
name = "user_auth_code"