Refactoring

This commit is contained in:
dahoud
2026-03-01 22:00:28 +00:00
parent c0e2c4da45
commit 6b28cf751e
469 changed files with 26866 additions and 14768 deletions

View File

@@ -0,0 +1,107 @@
package dev.lions.unionflow.client.service;
import dev.lions.unionflow.server.api.dto.comptabilite.request.*;
import dev.lions.unionflow.server.api.dto.comptabilite.response.*;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import java.util.List;
import java.util.UUID;
/**
* Service REST Client pour la gestion comptable
*
* @author UnionFlow Team
* @version 1.0
*/
@RegisterRestClient(configKey = "unionflow-api")
@RegisterClientHeaders(dev.lions.unionflow.client.security.AuthHeaderFactory.class)
@Path("/api/comptabilite")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public interface ComptabiliteService {
// ========================================
// COMPTES COMPTABLES
// ========================================
/**
* Liste tous les comptes comptables actifs
*/
@GET
@Path("/comptes")
List<CompteComptableResponse> listerComptes();
/**
* Crée un nouveau compte comptable
*/
@POST
@Path("/comptes")
CompteComptableResponse creerCompte(CreateCompteComptableRequest request);
/**
* Trouve un compte comptable par son ID
*/
@GET
@Path("/comptes/{id}")
CompteComptableResponse obtenirCompte(@PathParam("id") UUID id);
// ========================================
// JOURNAUX COMPTABLES
// ========================================
/**
* Liste tous les journaux comptables actifs
*/
@GET
@Path("/journaux")
List<JournalComptableResponse> listerJournaux();
/**
* Crée un nouveau journal comptable
*/
@POST
@Path("/journaux")
JournalComptableResponse creerJournal(CreateJournalComptableRequest request);
/**
* Trouve un journal comptable par son ID
*/
@GET
@Path("/journaux/{id}")
JournalComptableResponse obtenirJournal(@PathParam("id") UUID id);
// ========================================
// ÉCRITURES COMPTABLES
// ========================================
/**
* Crée une nouvelle écriture comptable
*/
@POST
@Path("/ecritures")
EcritureComptableResponse creerEcriture(CreateEcritureComptableRequest request);
/**
* Trouve une écriture comptable par son ID
*/
@GET
@Path("/ecritures/{id}")
EcritureComptableResponse obtenirEcriture(@PathParam("id") UUID id);
/**
* Liste les écritures d'un journal
*/
@GET
@Path("/ecritures/journal/{journalId}")
List<EcritureComptableResponse> listerEcrituresParJournal(@PathParam("journalId") UUID journalId);
/**
* Liste les écritures d'une organisation
*/
@GET
@Path("/ecritures/organisation/{organisationId}")
List<EcritureComptableResponse> listerEcrituresParOrganisation(@PathParam("organisationId") UUID organisationId);
}