From 37280c26bf9dd34017e59003a7b6f2c0b5cb89b0 Mon Sep 17 00:00:00 2001 From: ikjunoh Date: Thu, 1 Aug 2024 14:18:51 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20Entity=20column=EC=A4=91=20PK=20field?= =?UTF-8?q?=EB=8A=94=20Wrapper=20class=20=EC=82=AC=EC=9A=A9=20(CC-112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../caecae/findinggame/domain/entity/FindingGame.java | 2 +- .../findinggame/domain/entity/FindingGameAnswer.java | 8 +++----- .../findinggame/domain/entity/FindingGameWinner.java | 4 ++-- .../findinggame/domain/entity/FindingGameWinnerId.java | 4 ++-- .../racinggame/domain/entity/RacingGameParticipant.java | 4 +++- .../caecae/racinggame/domain/entity/RacingGameWinner.java | 4 +++- .../java/ai/softeer/caecae/user/domain/entity/User.java | 2 +- 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGame.java b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGame.java index a80bcf4..764fc81 100644 --- a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGame.java +++ b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGame.java @@ -10,7 +10,7 @@ @Entity public class FindingGame extends BaseEntity { @Id - private int findingGameId; + private Integer findingGameId; @Column(nullable = false) private String imageUrl; diff --git a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameAnswer.java b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameAnswer.java index 81222bb..f1b005b 100644 --- a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameAnswer.java +++ b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameAnswer.java @@ -1,15 +1,13 @@ package ai.softeer.caecae.findinggame.domain.entity; import ai.softeer.caecae.global.entity.BaseEntity; -import jakarta.persistence.Column; -import jakarta.persistence.GeneratedValue; -import jakarta.persistence.GenerationType; -import jakarta.persistence.Id; +import jakarta.persistence.*; +@Entity public class FindingGameAnswer extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - private int id; + private Integer id; @Column(nullable = false) private int coordX; diff --git a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinner.java b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinner.java index e818685..64f2029 100644 --- a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinner.java +++ b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinner.java @@ -9,8 +9,8 @@ @IdClass(FindingGameWinnerId.class) public class FindingGameWinner extends BaseEntity { @Id - private int userId; + private Integer userId; @Id - private int findingGameId; + private Integer findingGameId; } \ No newline at end of file diff --git a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinnerId.java b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinnerId.java index 893632e..c5c62cc 100644 --- a/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinnerId.java +++ b/src/main/java/ai/softeer/caecae/findinggame/domain/entity/FindingGameWinnerId.java @@ -3,8 +3,8 @@ import java.io.Serializable; public class FindingGameWinnerId implements Serializable { - private int userId; - private int findingGameId; + private Integer userId; + private Integer findingGameId; public FindingGameWinnerId(Integer userId, Integer findingGameId) { this.userId = userId; diff --git a/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameParticipant.java b/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameParticipant.java index 8c281b1..7d73b5a 100644 --- a/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameParticipant.java +++ b/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameParticipant.java @@ -2,11 +2,13 @@ import ai.softeer.caecae.global.entity.BaseEntity; import jakarta.persistence.Column; +import jakarta.persistence.Entity; import jakarta.persistence.Id; +@Entity public class RacingGameParticipant extends BaseEntity { @Id - private int userId; + private Integer userId; @Column(nullable = false) private double distance; diff --git a/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameWinner.java b/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameWinner.java index 1031101..4f6bb31 100644 --- a/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameWinner.java +++ b/src/main/java/ai/softeer/caecae/racinggame/domain/entity/RacingGameWinner.java @@ -2,11 +2,13 @@ import ai.softeer.caecae.global.entity.BaseEntity; import jakarta.persistence.Column; +import jakarta.persistence.Entity; import jakarta.persistence.Id; +@Entity public class RacingGameWinner extends BaseEntity { @Id - private int userId; + private Integer userId; @Column(nullable = false) private int rank; diff --git a/src/main/java/ai/softeer/caecae/user/domain/entity/User.java b/src/main/java/ai/softeer/caecae/user/domain/entity/User.java index 9fa7a17..5e619cc 100644 --- a/src/main/java/ai/softeer/caecae/user/domain/entity/User.java +++ b/src/main/java/ai/softeer/caecae/user/domain/entity/User.java @@ -9,7 +9,7 @@ public class User extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - private int id; + private Integer id; @Column(unique = true, nullable = false) private int phone;