Skip to content

Commit

Permalink
[#1]feat: Feedback Entity 설계 (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
fakerdeft authored Sep 11, 2023
1 parent d4d3d6f commit 61abef7
Showing 1 changed file with 52 additions and 0 deletions.
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);
}

}
}

0 comments on commit 61abef7

Please sign in to comment.