-
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
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...pa-calendar-domain/src/main/java/com/wypl/jpacalendardomain/schedule/domain/Schedule.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,38 @@ | ||
package com.wypl.jpacalendardomain.schedule.domain; | ||
|
||
import jakarta.persistence.*; | ||
import lombok.*; | ||
import org.hibernate.annotations.SQLRestriction; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
@Builder | ||
@Getter | ||
@AllArgsConstructor | ||
@NoArgsConstructor(access = AccessLevel.PROTECTED) | ||
@SQLRestriction("deleted_at is null") | ||
@Entity | ||
public class Schedule { | ||
// Todo : extends BaseEntity | ||
|
||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
@Column(name = "schedule_id") | ||
private Long scheduleId; | ||
|
||
@ManyToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "schedule_info_id") | ||
@Column(nullable = false) | ||
private ScheduleInfo scheduleInfo; | ||
|
||
// Todo : length 설정 | ||
private String title; | ||
|
||
private String description; | ||
|
||
@Column(name = "start_datetime", nullable = false) | ||
private LocalDateTime startDateTime; | ||
|
||
@Column(name = "end_datetime", nullable = false) | ||
private LocalDateTime endDateTime; | ||
} |