Merged
Conversation
Owner
HE-LU
commented
Aug 1, 2025
- Migrate all models to entities
- Cleanup the code
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the data layer architecture from "models" to "entities", updating import paths and class names throughout the codebase to follow a more domain-driven design pattern.
- Renames all model classes to entity classes (e.g.,
UserModel→UserEntity) - Updates all import statements from
model/toentity/directories - Introduces extension methods on DTOs to convert to entities, removing factory methods from entity classes
- Updates code generation configuration and documentation to reflect the new naming convention
Reviewed Changes
Copilot reviewed 40 out of 44 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| project_setup/lib/core/splash_screen_generator.dart | Updated import path from model to entity |
| project_setup/lib/core/model/app_icon_variant_model.dart | Updated import path from model to entity |
| project_setup/lib/core/app_icon_generator.dart | Updated import paths from model to entity |
| project_setup/lib/configuration.dart | Updated import paths from model to entity |
| lib/features/profile/profile_state.dart | Updated imports and provider references |
| lib/features/landing/landing_page.dart | Updated provider reference from model to entity |
| lib/features/debug_tools/page/text_styles/debug_tools_text_styles_page_content.dart | Updated import path from model to entity |
| lib/features/debug_tools/page/colors/debug_tools_colors_page_content.dart | Updated import path from model to entity |
| lib/features/authentication/authentication_state.dart | Updated imports and type annotations |
| lib/core/analytics/analytics_manager.dart | Updated imports and function parameters |
| lib/common/validator/text_field_validator_state.dart | Updated exception import path |
| lib/common/validator/controller/text_validator_controller_general.dart | Updated exception import path |
| lib/common/usecase/user/set_database_user_use_case.dart | Updated imports and parameters |
| lib/common/usecase/user/get_database_user_use_case.dart | Updated imports, return types, and logging |
| lib/common/usecase/user/get_current_user_use_case.dart | Updated imports and method call |
| lib/common/usecase/authentication/*.dart | Updated imports and return types across authentication use cases |
| lib/common/provider/*.dart | Updated imports and class names for providers |
| lib/common/data/model/user_model.dart | Deleted original model file |
| lib/common/data/entity/user_entity.dart | Created new entity file with simplified structure |
| lib/common/data/entity/notification_payload_entity.dart | Updated part file references |
| lib/common/data/dto/user_response_dto.dart | Added extension method for entity conversion |
| lib/common/extension/*.dart | Updated exception import paths |
| lib/common/composition/placeholder/error_placeholder_widget.dart | Updated exception import path |
| Configuration files | Updated build configuration, workspace settings, and documentation |
| Templates | Removed model templates and added entity templates |
Comments suppressed due to low confidence (2)
lib/common/data/entity/notification_payload_entity.dart:4
- The part file reference still points to the old 'notification_payload_model.freezed.dart' instead of 'notification_payload_entity.freezed.dart'. This will cause code generation to fail.
part 'notification_payload_entity.freezed.dart';
lib/common/data/entity/notification_payload_entity.dart:5
- The part file reference still points to the old 'notification_payload_model.g.dart' instead of 'notification_payload_entity.g.dart'. This will cause code generation to fail.
part 'notification_payload_entity.g.dart';
809ea60 to
6c86296
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.