-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86c4f78
commit 7b40418
Showing
14 changed files
with
151 additions
and
35 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.idea | ||
.gitignore | ||
HELP.md | ||
mvnw* | ||
.mvn |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM openjdk:21 | ||
EXPOSE 8080 | ||
COPY target/*.jar app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar"] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
version: '3.8' | ||
|
||
services: | ||
db: | ||
image: mysql:8.0 | ||
environment: | ||
MYSQL_ROOT_PASSWORD: root | ||
MYSQL_DATABASE: videolocadora | ||
ports: | ||
- "3306:3306" | ||
restart: always | ||
|
||
app: | ||
build: . | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- db | ||
environment: | ||
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/videolocadora | ||
SPRING_DATASOURCE_USERNAME: root | ||
SPRING_DATASOURCE_PASSWORD: root |
This file contains 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
This file contains 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
9 changes: 7 additions & 2 deletions
9
...Locadora/src/main/java/io/github/gabryel/videolocadora/controller/CustomerController.java
This file contains 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
This file contains 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
This file contains 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
16 changes: 16 additions & 0 deletions
16
...ocadora/src/main/java/io/github/gabryel/videolocadora/mapper/customer/CustomerMapper.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package io.github.gabryel.videolocadora.mapper.customer; | ||
|
||
import io.github.gabryel.videolocadora.dto.customer.CustomerDetailDTO; | ||
import io.github.gabryel.videolocadora.entity.customer.CustomerEntity; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
|
||
@Mapper | ||
public interface CustomerMapper { | ||
|
||
CustomerMapper INSTANCE = Mappers.getMapper(CustomerMapper.class); | ||
|
||
CustomerDetailDTO toDetailDTO(CustomerEntity customerEntity); | ||
|
||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
#-- ADD CLIENTES, CPFs gerados automaticamente https://www.4devs.com.br/gerador_de_cpf | ||
|
||
create table CUSTOMER ( | ||
ID bigint not null, | ||
NAME varchar(255), | ||
CPF varchar(255), | ||
DELAY_DEVOLUTION boolean, | ||
EMAIL varchar(255), | ||
primary key (ID) | ||
); | ||
|
||
insert into CUSTOMER (ID, NAME, CPF, DELAY_DEVOLUTION, EMAIL) values (-2, 'João' , '37772382014', false, 'j@j.com'); | ||
insert into CUSTOMER (ID, NAME, CPF, DELAY_DEVOLUTION, EMAIL) values (-3, 'Jose' , '06355528091', false, 'j@j.com'); | ||
insert into CUSTOMER (ID, NAME, CPF, DELAY_DEVOLUTION, EMAIL) values (-4, 'Carlos', '80071319069', false, 'j@j.com'); | ||
insert into CUSTOMER (ID, NAME, CPF, DELAY_DEVOLUTION, EMAIL) values (-5, 'Pedro' , '81454522011', false, 'j@j.com'); | ||
insert into CUSTOMER (ID, NAME, CPF, DELAY_DEVOLUTION, EMAIL) values (-6, 'Will' , '14915748014', false, 'j@j.com'); |