mirror of
https://github.com/AdrianKuta/KahootQuiz.git
synced 2025-09-15 01:24:23 +02:00

This commit significantly expands the domain models to fully represent the quiz structure and implements the complete mapping logic in `QuizMapper` to convert `QuizResponseDto` and its nested DTOs to their corresponding domain models. Key changes: - **Domain Layer (`domain` module):** - Introduced a `QuizId` value class for type safety. - Added comprehensive domain models for all aspects of a quiz, including: - `Quiz`: Updated to include all fields from the DTO. - `Question`, `Choice`, `Video`, `ImageMetadata`, `MediaItem`, `ChoiceRange`: For question details. - `CoverMetadata`, `ExtractedColor`, `Crop`, `Point`: For cover image information. - `ContentTags`: For curriculum and generated codes. - `Metadata`, `Access`, `FeaturedListMembership`, `LastEdit`, `VersionMetadata`: For quiz metadata. - `LanguageInfo`, `Channel`: Common reusable models. - Organized domain models into separate files for better maintainability (e.g., `Question.kt`, `CoverMetadata.kt`). - Added a placeholder `QuestionModels.kt` to indicate that models were moved. - **Data Layer (`model:data` module):** - Implemented a complete `toDomainModel()` extension function in `QuizMapper.kt` to map all fields from `QuizResponseDto` and its nested DTOs (like `CoverMetadataDto`, `QuestionDto`, etc.) to the new domain models. - This includes mapping for lists and nullable fields. - **App Module (`app` module):** - Updated `MainActivity` to access `quizId.value` due to `QuizId` being a value class. - **Network Layer (`core:network` module):** - Changed `QuizResponseDto.uuid` to be non-nullable (`String`) as it's essential for mapping to `QuizId`. - Removed `QuizResponse.kt` as DTOs were previously split into individual files.
40 lines
1.6 KiB
XML
40 lines
1.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project version="4">
|
|
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
<component name="GradleSettings">
|
|
<option name="linkedExternalProjectsSettings">
|
|
<GradleProjectSettings>
|
|
<compositeConfiguration>
|
|
<compositeBuild compositeDefinitionSource="SCRIPT">
|
|
<builds>
|
|
<build path="$PROJECT_DIR$/build-logic" name="build-logic">
|
|
<projects>
|
|
<project path="$PROJECT_DIR$/build-logic" />
|
|
<project path="$PROJECT_DIR$/build-logic/convention" />
|
|
</projects>
|
|
</build>
|
|
</builds>
|
|
</compositeBuild>
|
|
</compositeConfiguration>
|
|
<option name="testRunner" value="CHOOSE_PER_TEST" />
|
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
|
<option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" />
|
|
<option name="modules">
|
|
<set>
|
|
<option value="$PROJECT_DIR$" />
|
|
<option value="$PROJECT_DIR$/app" />
|
|
<option value="$PROJECT_DIR$/build-logic" />
|
|
<option value="$PROJECT_DIR$/build-logic/convention" />
|
|
<option value="$PROJECT_DIR$/core" />
|
|
<option value="$PROJECT_DIR$/core/network" />
|
|
<option value="$PROJECT_DIR$/domain" />
|
|
<option value="$PROJECT_DIR$/model" />
|
|
<option value="$PROJECT_DIR$/model/data" />
|
|
<option value="$PROJECT_DIR$/ui" />
|
|
<option value="$PROJECT_DIR$/ui/quiz" />
|
|
</set>
|
|
</option>
|
|
</GradleProjectSettings>
|
|
</option>
|
|
</component>
|
|
</project> |