-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathBoard.java
More file actions
39 lines (26 loc) · 843 Bytes
/
Board.java
File metadata and controls
39 lines (26 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.makefire.anonymous.domain.board.entity;
import com.makefire.anonymous.domain.common.BasicEntity;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
public class Board extends BasicEntity {
@NotNull(message = "Title must not be null")
private String title;
private String content;
@NotNull(message = "Author must not be null")
private String author;
private Long authorId;
@Builder
public Board(String title, String content, String author, Long authorId) {
this.title = title;
this.content = content;
this.author = author;
this.authorId = authorId;
}
}