feat: 수강신청 프로젝트 생성
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
package com.study.course_registration.entity;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Entity
|
||||
@NoArgsConstructor
|
||||
@Getter
|
||||
@Table(name = "lessons")
|
||||
public class Lesson extends BaseTimeZoneEntity {
|
||||
private String name;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
private Subject subject;
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
private Professor professor;
|
||||
|
||||
private Instant startTime;
|
||||
|
||||
private Instant endTime;
|
||||
|
||||
public Lesson(String name, Subject subject, Professor professor, Instant startTime, Instant endTime) {
|
||||
this.name = name;
|
||||
this.subject = subject;
|
||||
this.professor = professor;
|
||||
this.startTime = startTime;
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user