Conversation
…son-company-et-contract 2 définir les entités client person company et contract
…alidation on field
- Introduced PersonCreateDTO, PersonUpdateDTO, CompanyCreateDTO, CompanyUpdateDTO to separate creation/update payloads from the Client model - Updated ClientService to handle DTOs instead of raw entities - Updated ClientController to include validation on input DTOs - Added controller tests covering create, update, get, delete, and validation scenarios for both Person and Company clients (AI generated based on model and controllers)
- Added checks in ClientService to prevent saving Person or Company with an email or phone number already in use - Throws IllegalArgumentException if duplication is detected - Ensures data integrity and prevents multiple clients sharing the same contact info
…ient 11 service and controller for client
…xpose trough API. suggestion : return more info on client to minimize api call for the frontend. (like name, phone, mail, and type of client) -> should be done in another PR
…o do more tests for securing the correct behavior of the functionnality) (testsuite need to be done)
Add contract endpoints to ClientController (related to client also)
Add contract endpoints to ContractController
Clarify parameter naming : {clientId} vs {contractId} in controllers
Implement client deletion logic -> set enddate on active contracts.
To manage client deletion, I introduced a ClientStatus enum with the values ACTIVE and DELETED. As part of this change, I refactored all client-related services to include logic that filters clients by status = ACTIVE. With this implementation, clients are safely excluded from all API operations once marked as deleted, while preserving the relationship between clients and their contracts.
…ntract 18 service and controller for contract
…oint to ensure a valid and more friendly error handling
and also for contract controller. all test is generated by AI.
21 testsuite
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.