-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
52 changes: 52 additions & 0 deletions
52
src/main/java/com/loveloveshot/feedback/command/domain/aggregate/entity/Feedback.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.loveloveshot.feedback.command.domain.aggregate.entity; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
import javax.persistence.*; | ||
|
||
@Entity | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED, force = true) | ||
@Table(name = "TBL_FEEDBACK") | ||
public class Feedback { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long feedbackNo; | ||
|
||
@Column(columnDefinition = "LONGTEXT") | ||
private String feedbackContent; | ||
|
||
// @Column | ||
// private Date feedbackDate; | ||
// @Column | ||
// private String feedbackTitle; | ||
// @Embedded | ||
// private FeedbackWriterVO feedbackWriterVO; | ||
|
||
public Feedback(Builder builder) { | ||
this.feedbackNo = builder.feedbackNo; | ||
this.feedbackContent = builder.feedbackContent; | ||
} | ||
|
||
public static class Builder { | ||
private Long feedbackNo; | ||
private String feedbackContent; | ||
|
||
public Builder feedbackNo(Long feedbackNo) { | ||
this.feedbackNo = feedbackNo; | ||
return this; | ||
} | ||
|
||
public Builder feedbackContent(String feedbackContent) { | ||
this.feedbackContent = feedbackContent; | ||
return this; | ||
} | ||
|
||
public Feedback build() { | ||
return new Feedback(this); | ||
} | ||
|
||
} | ||
} |