-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 현재 만든 API 요청을 json body로 읽기위한 request DTO 생성했습니다. 2. GameController에서 json body를 읽도록 수정
- Loading branch information
Showing
5 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
BE/baseball/src/main/java/team9/baseball/DTO/request/CreateGameDTO.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,11 @@ | ||
package team9.baseball.DTO.request; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public class CreateGameDTO { | ||
private int away_team_id; | ||
private int home_team_id; | ||
} |
16 changes: 16 additions & 0 deletions
16
BE/baseball/src/main/java/team9/baseball/DTO/request/JoinGameDTO.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 team9.baseball.DTO.request; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import team9.baseball.domain.enums.Venue; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public class JoinGameDTO { | ||
private int game_id; | ||
|
||
@NotNull | ||
private Venue my_venue; | ||
} |
13 changes: 13 additions & 0 deletions
13
BE/baseball/src/main/java/team9/baseball/DTO/request/PitchResultDTO.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,13 @@ | ||
package team9.baseball.DTO.request; | ||
|
||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.Setter; | ||
import team9.baseball.domain.enums.PitchResult; | ||
|
||
@Getter | ||
@Setter | ||
@NoArgsConstructor | ||
public class PitchResultDTO { | ||
private PitchResult pitch_result; | ||
} |
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 |
---|---|---|
|
@@ -12,4 +12,6 @@ INSERT INTO player (team_id, name, uniform_number) VALUES (2, '크롱', 3); | |
INSERT INTO player (team_id, name, uniform_number) VALUES (2, '세라', 4); | ||
INSERT INTO player (team_id, name, uniform_number) VALUES (2, '헤드', 5); | ||
|
||
INSERT INTO `user` (email) VALUES ('[email protected]'); | ||
INSERT INTO `user` (email) VALUES ('[email protected]'); | ||
INSERT INTO `user` (email) VALUES ('[email protected]'); | ||
INSERT INTO `user` (email) VALUES ('[email protected]'); |