-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
5c5301d
commit f92f001
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...smate-backend-main/classmate/src/main/java/devteamOne/classmate/survey/domain/Survey.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,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<>(); | ||
} |