mirror of
https://github.com/koloideal/Quizzi.git
synced 2026-06-10 18:35:28 +03:00
commit
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
from .option import OptionDAO as OptionDAO
|
||||
from .question import QuestionDAO as QuestionDAO
|
||||
from .test import TestDAO as TestDAO
|
||||
from .user import UserDAO as UserDAO
|
||||
from .question import QuestionDAO as QuestionDAO
|
||||
from .option import OptionDAO as OptionDAO
|
||||
@@ -1,5 +1,6 @@
|
||||
from trudex.domain.schemas import TestAttempt as DomainTestAttempt
|
||||
from trudex.infrastructure.database.models import TestAttempt as TestAttemptModel
|
||||
from trudex.infrastructure.database.models import \
|
||||
TestAttempt as TestAttemptModel
|
||||
|
||||
|
||||
class TestAttemptDTO:
|
||||
|
||||
@@ -2,7 +2,8 @@ from datetime import datetime
|
||||
from enum import Enum
|
||||
from typing import final
|
||||
|
||||
from sqlalchemy import BigInteger, CheckConstraint, ForeignKey, Integer, String, Text, func
|
||||
from sqlalchemy import (BigInteger, CheckConstraint, ForeignKey, Integer,
|
||||
String, Text, func)
|
||||
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column, relationship
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from trudex.infrastructure.database.repo.test import TestRepository
|
||||
from trudex.infrastructure.database.repo.test_attempt import TestAttemptRepository
|
||||
from trudex.infrastructure.database.repo.test_attempt import \
|
||||
TestAttemptRepository
|
||||
from trudex.infrastructure.database.repo.user import UserRepository
|
||||
|
||||
__all__ = ["TestRepository", "TestAttemptRepository", "UserRepository"]
|
||||
|
||||
@@ -11,11 +11,9 @@ from trudex.infrastructure.database.dao.test import TestDAO
|
||||
from trudex.infrastructure.database.dto.option import OptionDTO
|
||||
from trudex.infrastructure.database.dto.question import QuestionDTO
|
||||
from trudex.infrastructure.database.dto.test import TestDTO
|
||||
from trudex.infrastructure.database.models import (
|
||||
Option as OptionModel,
|
||||
Question as QuestionModel,
|
||||
Test as TestModel,
|
||||
)
|
||||
from trudex.infrastructure.database.models import Option as OptionModel
|
||||
from trudex.infrastructure.database.models import Question as QuestionModel
|
||||
from trudex.infrastructure.database.models import Test as TestModel
|
||||
|
||||
|
||||
@final
|
||||
|
||||
@@ -10,10 +10,9 @@ from trudex.infrastructure.database.dao.test_attempt import TestAttemptDAO
|
||||
from trudex.infrastructure.database.dao.user_answer import UserAnswerDAO
|
||||
from trudex.infrastructure.database.dto.test_attempt import TestAttemptDTO
|
||||
from trudex.infrastructure.database.dto.user_answer import UserAnswerDTO
|
||||
from trudex.infrastructure.database.models import (
|
||||
TestAttempt as TestAttemptModel,
|
||||
UserAnswer as UserAnswerModel,
|
||||
)
|
||||
from trudex.infrastructure.database.models import \
|
||||
TestAttempt as TestAttemptModel
|
||||
from trudex.infrastructure.database.models import UserAnswer as UserAnswerModel
|
||||
|
||||
|
||||
@final
|
||||
@@ -177,7 +176,8 @@ class TestAttemptRepository:
|
||||
}
|
||||
|
||||
async def get_most_difficult_questions(self, test_id: int, limit: int = 10) -> list[tuple[int, float]]:
|
||||
from trudex.infrastructure.database.models import Question as QuestionModel
|
||||
from trudex.infrastructure.database.models import \
|
||||
Question as QuestionModel
|
||||
|
||||
result = await self.session.execute(
|
||||
select(
|
||||
|
||||
Reference in New Issue
Block a user