-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentCourse.java
More file actions
40 lines (29 loc) · 852 Bytes
/
StudentCourse.java
File metadata and controls
40 lines (29 loc) · 852 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.example.enjoy.entity;
import com.example.enjoy.dto.StudentCourseStatus;
import jakarta.persistence.*;
import lombok.*;
import java.time.LocalDateTime;
@Entity
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor
@Builder
public class StudentCourse extends BaseTimeEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String studentId;
@Column(nullable = false)
private String courseName;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private StudentCourseStatus status;
@Column(nullable = false)
private boolean manual;
@Column(nullable = false)
private LocalDateTime createdAt;
public void updateStatus(StudentCourseStatus status) {
this.status = status;
}
}