Skip to content

Commit

Permalink
Feat(#3): Schedule Entity 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
sjhjack committed Sep 13, 2024
1 parent ba12b95 commit a5d6458
Showing 1 changed file with 38 additions and 0 deletions.
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;
}

0 comments on commit a5d6458

Please sign in to comment.