Esse projeto é uma API Java Spring que permite clientes alugarem carros por determinado período.
A API foi feita utilizando Clean Architecture juntamente com Domain Drive Design, seguindo os princípios do SOLID para melhor estruturação do código.
Contém mais de 260 testes, incluindo testes unitários, testes de integração e end-to-end com JUnit e Mockito para todas as partes da aplicação, sejam elas modelos, serviços, use cases e controllers.
Java 21.
Spring 3.
Apache Maven 3.9.1.
Liquibase.
JUnit.
Mockito.
- Create Car
POST /car - Delete car by id
DELETE /car/{id} - Get All Cars
GET /car - Get Car By Id
GET /car/{id} - Update car
PUT /car/{id} - Get car availability
GET /car/availability/{id}
- Create customer
POST /customer - Activate customer
PATCH /customer/{id}/activate - Deactivate customer
PATCH /customer/{id}/deactivate - Get customer by id
GET /customer/{id} - Get customers by filter:
GET /customer?nameStarting={Name}&nameContaining={Containing} - Delete customer
DELETE /customer/{id} - Update customer
UPDATE /customer/{id}
- Create Rental controller
POST /rental - Get all rentals
GET /rental - Get rental by id
GET /rental/{id} - Get rentals by card id and time range
GET /rental/search?cardId={}&startTime={}&endTime={} - Get rentals by customer id
GET /rental/customer/{id} - Update rental
UPDATE /rental/{id} - Delete rental by id DELETE /rental/{id}