Skip to content

Commit

Permalink
♻️ refactor: Validation 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
akalswl14 committed Apr 24, 2023
1 parent ad0c4f0 commit fb0753f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/com/yapp/artie/domain/notice/domain/Notice.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.validation.constraints.NotNull;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -20,12 +21,14 @@ public class Notice {
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

@NotNull
@Column(nullable = false)
private String title;

@Column(columnDefinition = "text")
private String contents;

@NotNull
@Column(nullable = false, updatable = false)
@CreatedDate
private LocalDateTime createdAt;
Expand Down

0 comments on commit fb0753f

Please sign in to comment.