Skip to content

Commit

Permalink
fix : Entity column중 PK field는 Wrapper class 사용 (CC-112)
Browse files Browse the repository at this point in the history
  • Loading branch information
putdata committed Aug 1, 2024
1 parent cc9afcd commit 37280c2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@Entity
public class FindingGame extends BaseEntity {
@Id
private int findingGameId;
private Integer findingGameId;

@Column(nullable = false)
private String imageUrl;
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 37280c2

Please sign in to comment.