Skip to content

Commit

Permalink
[refactor] Mission에서 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 68d77b3 commit 62fe08d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/sopt/app/domain/entity/soptamp/Mission.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

import io.hypersistence.utils.hibernate.type.array.ListArrayType;
import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.util.List;
import lombok.*;
import org.hibernate.annotations.ColumnDefault;
import org.hibernate.annotations.Type;

@Entity
Expand All @@ -18,10 +20,14 @@ public class Mission {
@Column(name = "mission_id")
private Long id;

@NotNull
private String title;

@NotNull
private Integer level;

@NotNull
@ColumnDefault("false")
private boolean display;

@Type(value= ListArrayType.class)
Expand Down

0 comments on commit 62fe08d

Please sign in to comment.