Skip to content

feat: Migrate models to entities#12

Merged
HE-LU merged 1 commit intomainfrom
helu/feat/model_to_entity_migration
Aug 1, 2025
Merged

feat: Migrate models to entities#12
HE-LU merged 1 commit intomainfrom
helu/feat/model_to_entity_migration

Conversation

@HE-LU
Copy link
Copy Markdown
Owner

@HE-LU HE-LU commented Aug 1, 2025

  • Migrate all models to entities
  • Cleanup the code

@HE-LU HE-LU self-assigned this Aug 1, 2025
Repository owner deleted a comment from coderabbitai Bot Aug 1, 2025
@HE-LU HE-LU requested a review from Copilot August 1, 2025 18:45
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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., UserModelUserEntity)
  • Updates all import statements from model/ to entity/ 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';

@HE-LU HE-LU force-pushed the helu/feat/model_to_entity_migration branch from 809ea60 to 6c86296 Compare August 1, 2025 18:50
@HE-LU HE-LU merged commit bc0a325 into main Aug 1, 2025
1 check passed
@HE-LU HE-LU deleted the helu/feat/model_to_entity_migration branch August 1, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants