Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tsaytson/boardcamp-java
Boardcamp is a management system for board games rentals
https://github.com/tsaytson/boardcamp-java
globalexceptionhandler hibernate-orm java17 jpa-hibernate junit maven postgresql spring-boot springdevtools springweb validation
Last synced: 28 days ago
JSON representation
Boardcamp is a management system for board games rentals
- Host: GitHub
- URL: https://github.com/tsaytson/boardcamp-java
- Owner: TSaytson
- Created: 2024-02-03T06:37:38.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-20T15:09:10.000Z (6 months ago)
- Last Synced: 2024-06-21T08:45:18.918Z (6 months ago)
- Topics: globalexceptionhandler, hibernate-orm, java17, jpa-hibernate, junit, maven, postgresql, spring-boot, springdevtools, springweb, validation
- Language: Java
- Homepage: http://ec2-3-138-111-230.us-east-2.compute.amazonaws.com
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to Boardcamp API
The API for the lovers of board games. Boardcamp API handles REST requests for board games rentals as described below## Customers
### GET /customers/:customerId
```
{
id: 1,
name: 'João Alfredo',
cpf: '01234567890'
}
```### POST /customers
```
{
name: 'João Alfredo',
cpf: '01234567890'
}
```
#### Response
```
{
id: 1,
name: 'João Alfredo',
cpf: '01234567890'
}
```## Games
### GET /games
```
[
{
id: 1,
name: 'Banco Imobiliário',
image: 'http://',
stockTotal: 3,
pricePerDay: 1500
},
{
id: 2,
name: 'Detetive',
image: 'http://',
stockTotal: 1,
pricePerDay: 2500
},
]
```### POST /games
```
{
name: 'Banco Imobiliário',
image: 'http://www.imagem.com.br/banco_imobiliario.jpg',
stockTotal: 3,
pricePerDay: 1500
}
```
#### Response
```
{
id: 1,
name: 'Banco Imobiliário',
image: 'http://www.imagem.com.br/banco_imobiliario.jpg',
stockTotal: 3,
pricePerDay: 1500
}
```## Rentals
### GET /rentals
```
[
{
id: 1,
rentDate: '2021-06-20',
daysRented: 3,
returnDate: null, // troca pra uma data quando já devolvido
originalPrice: 4500,
delayFee: 0, // troca por outro valor caso tenha devolvido com atraso
customer: {
id: 1,
name: 'João Alfredo',
cpf: '01234567890'
},
game: {
id: 1,
name: 'Banco Imobiliário',
image: 'http://www.imagem.com.br/banco.jpg',
stockTotal: 3,
pricePerDay: 1500
}
}
]
```
### POST /rentals
```
{
customerId: 1,
gameId: 1,
daysRented: 3
}
```
#### Response
```
{
id: 1,
rentDate: '2021-06-20',
daysRented: 3,
returnDate: null,
originalPrice: 4500,
delayFee: 0,
customer: {
id: 1,
name: 'João Alfredo',
cpf: '01234567890'
},
game: {
id: 1,
name: 'Banco Imobiliário',
image: 'http://www.imagem.com.br/banco.jpg',
stockTotal: 3,
pricePerDay: 1500
}
}
```
### PUT /rentals/:rentalId/return
```
{
id: 1,
rentDate: '2021-06-20',
daysRented: 3,
returnDate: '2021-06-25',
originalPrice: 4500,
delayFee: 3000,
customer: {
id: 1,
name: 'João Alfredo',
cpf: '01234567890'
},
game: {
id: 1,
name: 'Banco Imobiliário',
image: 'http://www.imagem.com.br/banco.jpg',
stockTotal: 3,
pricePerDay: 1500
}
}
```