Skip to content

Commit

Permalink
[refactor] PokeHistory에서 NotNull 제약조건 추가 및 default value 추가 (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
kseysh committed Oct 8, 2024
1 parent 3b6456a commit f34cbb7
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import lombok.*;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import org.hibernate.annotations.ColumnDefault;
import org.sopt.app.domain.entity.BaseEntity;

@Getter
Expand All @@ -22,13 +23,17 @@ public class PokeHistory extends BaseEntity {
@NotNull
private Long pokedId;

@NotNull
@Column(columnDefinition = "TEXT")
private String message;

private Boolean isReply;
@NotNull
@ColumnDefault("false")
private boolean isReply;

@NotNull
private Boolean isAnonymous;
@ColumnDefault("false")
private boolean isAnonymous;

public void activateReply() {
this.isReply = true;
Expand Down

0 comments on commit f34cbb7

Please sign in to comment.