Feature/es 89 design the customer domain layer#43
Merged
raouf-b-dev merged 5 commits intomasterfrom Nov 22, 2025
Merged
Conversation
…tats, Email, and Phone - Introduced CustomerName class to encapsulate first and last name with validation. - Created CustomerStats class to manage customer order statistics, including total orders and total spent. - Implemented Email class for email validation and formatting. - Added Phone class with validation for phone numbers, ensuring a minimum digit requirement. - Each class includes methods for equality checks and static factory methods for instantiation.
- Added AddressType enum to define address categories: HOME, WORK, and OTHER. - Refactored AddAddressDto, AddressResponseDto, and UpdateAddressDto to import AddressType from the new location, improving code organization and maintainability.
- Added Address class to encapsulate address properties and validation logic. - Introduced IAddress interface to define the structure of address data. - Implemented methods for address manipulation, including updating and serialization. - Enhanced address validation to ensure required fields are present and valid.
- Added Customer class to encapsulate customer properties and validation logic. - Introduced ICustomer interface to define the structure of customer data. - Implemented methods for customer manipulation, including address management and order tracking. - Enhanced validation to ensure required fields are present and valid, including email format and non-negative order statistics.
- Introduced CustomerRepository abstract class to define methods for customer data retrieval and manipulation. - Added methods for finding customers by ID, email, and phone, as well as for saving, updating, and deleting customer records. - Enhanced method signatures to return results wrapped in a Result type for better error handling.
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.
No description provided.