mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-16 21:00:27 +00:00
602ce67e41
`apps` → `core`
33 lines
776 B
Python
33 lines
776 B
Python
from typing import List
|
|
|
|
from utils.mysql import MySQL
|
|
from .models import Question, Answer
|
|
|
|
|
|
class QuizRepository:
|
|
def __init__(self, mysql: MySQL):
|
|
self.mysql = mysql
|
|
|
|
async def get_question_list(self) -> List[Question]:
|
|
pass
|
|
|
|
async def get_answer_form_question_id(self, question_id: int) -> List[Answer]:
|
|
pass
|
|
|
|
async def add_question(self, question: str):
|
|
pass
|
|
|
|
async def get_question(self, question: str) -> Question:
|
|
pass
|
|
|
|
async def add_answer(self, question_id: int, is_correct: int, answer: str):
|
|
pass
|
|
|
|
async def delete_question(self, question_id: int):
|
|
pass
|
|
|
|
async def delete_answer(self, answer_id: int):
|
|
pass
|
|
|
|
async def delete_admin(self, user_id: int):
|
|
pass |