Skip to content

Commit

Permalink
feat: Survey Entity 생성 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
isieun0908 committed Mar 16, 2023
1 parent 5c5301d commit f92f001
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package devteamOne.classmate.survey.domain;

import devteamOne.classmate.channel.domain.Channel;
import devteamOne.classmate.surveyOption.domain.SurveyOption;
import jakarta.persistence.*;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Entity
public class Survey {

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;

private String question;

private Boolean multipleCheck;

private Boolean opened;

private LocalDateTime createdAt;

@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "channel_id")
private Channel channel;

@OneToMany(mappedBy = "survey")
private List<SurveyOption> surveyOptionList = new ArrayList<>();
}

0 comments on commit f92f001

Please sign in to comment.