Skip to content

Commit 3e3fe90

Browse files
committed
엔티티 nullable 추가
1 parent 84d78f5 commit 3e3fe90

File tree

2 files changed

+7
-14
lines changed

2 files changed

+7
-14
lines changed

src/main/java/com/sopkathon/domain/review/entity/ReviewEntity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ public class ReviewEntity {
1616
@GeneratedValue(strategy = GenerationType.IDENTITY)
1717
private Long id;
1818

19-
@Column(name = "createdAt")
19+
@Column(name = "createdAt", nullable = false)
2020
private LocalDateTime createdAt;
2121

22-
@Column(name = "author")
22+
@Column(name = "author", nullable = false)
2323
private String author;
2424

25-
@Column(name = "comment")
25+
@Column(name = "comment", nullable = false)
2626
private String comment;
2727

28-
@Column(name = "profile_image_url")
28+
@Column(name = "profile_image_url", nullable = false)
2929
private String profileImageUrl;
3030
}

src/main/java/com/sopkathon/domain/similarPlace/entity/SimilarPlaceEntity.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,12 @@ public class SimilarPlaceEntity {
1414
@GeneratedValue(strategy = GenerationType.IDENTITY)
1515
private Long id;
1616

17-
@Column(name = "duration")
17+
@Column(name = "duration", nullable = false)
1818
private String duration;
1919

20-
@Column(name = "description")
20+
@Column(name = "description", nullable = false)
2121
private String description;
2222

23-
@Column(name = "photoUrl")
23+
@Column(name = "photoUrl", nullable = false)
2424
private String photoUrl;
25-
26-
public SimilarPlaceEntity(String duration, String description, String photoUrl) {
27-
this.duration = duration;
28-
this.description = description;
29-
this.photoUrl = photoUrl;
30-
}
31-
3225
}

0 commit comments

Comments
 (0)