🚑 Redis.get was replaced by redis.search

This commit is contained in:
Mawoka
2022-03-12 17:44:40 +01:00
parent e9fe8d2d60
commit 33d2e095fb
2 changed files with 20 additions and 11 deletions
+11 -2
View File
@@ -9,7 +9,7 @@ from . import metadata, database
class User(ormar.Model):
"""
The user model
The user model in the database
"""
id: uuid.UUID = ormar.UUID(primary_key=True, default=uuid.uuid4())
email: str = ormar.String(unique=True, max_length=100)
@@ -27,7 +27,7 @@ class User(ormar.Model):
class UserSession(ormar.Model):
"""
The user session model
The user session model for user-sessions
"""
id: uuid.UUID = ormar.UUID(primary_key=True, default=uuid.uuid4())
user: uuid.UUID = ormar.ForeignKey(User)
@@ -78,15 +78,24 @@ class Quiz(ormar.Model):
class Token(BaseModel):
"""
For JWT
"""
access_token: str
token_type: str
class TokenData(BaseModel):
"""
For JWT
"""
email: str | None = None
class PlayGame(BaseModel):
"""
For JWT
"""
quiz_id: uuid.UUID | str
description: str
title: str