Skip to content

Merge on main branch#17

Merged
jubbakka merged 31 commits into
mainfrom
develop
Oct 20, 2025
Merged

Merge on main branch#17
jubbakka merged 31 commits into
mainfrom
develop

Conversation

@jubbakka
Copy link
Copy Markdown
Owner

No description provided.

jubbakka and others added 9 commits October 16, 2025 18:36
…son-company-et-contract

2 définir les entités client person company et contract
- 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
@jubbakka jubbakka marked this pull request as draft October 17, 2025 20:36
jubbakka and others added 20 commits October 17, 2025 22:48
…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
jubbakka and others added 2 commits October 20, 2025 17:06
and also for contract controller.
all test is generated by AI.
@jubbakka jubbakka marked this pull request as ready for review October 20, 2025 15:20
@jubbakka jubbakka merged commit 8de78d8 into main Oct 20, 2025
2 checks passed
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