Skip to content

Feature/es 89 design the customer domain layer#43

Merged
raouf-b-dev merged 5 commits intomasterfrom
feature/ES-89-design-the-customer-domain-layer
Nov 22, 2025
Merged

Feature/es 89 design the customer domain layer#43
raouf-b-dev merged 5 commits intomasterfrom
feature/ES-89-design-the-customer-domain-layer

Conversation

@raouf-b-dev
Copy link
Owner

No description provided.

…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.
@raouf-b-dev raouf-b-dev self-assigned this Nov 22, 2025
@raouf-b-dev raouf-b-dev merged commit 691e706 into master Nov 22, 2025
1 check passed
@raouf-b-dev raouf-b-dev deleted the feature/ES-89-design-the-customer-domain-layer branch November 22, 2025 08:30
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.

1 participant