PaiGram/core/quiz/repositories.py

33 lines
776 B
Python
Raw Normal View History

2022-07-26 10:07:31 +00:00
from typing import List
from utils.mysql import MySQL
2022-08-05 11:14:29 +00:00
from .models import Question, Answer
2022-07-26 10:07:31 +00:00
class QuizRepository:
def __init__(self, mysql: MySQL):
self.mysql = mysql
async def get_question_list(self) -> List[Question]:
pass
2022-07-26 10:07:31 +00:00
async def get_answer_form_question_id(self, question_id: int) -> List[Answer]:
pass
2022-07-26 10:07:31 +00:00
async def add_question(self, question: str):
pass
2022-07-26 10:07:31 +00:00
async def get_question(self, question: str) -> Question:
pass
2022-07-26 10:07:31 +00:00
async def add_answer(self, question_id: int, is_correct: int, answer: str):
pass
2022-07-26 10:07:31 +00:00
async def delete_question(self, question_id: int):
pass
2022-07-26 10:07:31 +00:00
async def delete_answer(self, answer_id: int):
pass
2022-07-26 10:07:31 +00:00
async def delete_admin(self, user_id: int):
pass