-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScheduleTask.java
More file actions
45 lines (33 loc) · 958 Bytes
/
ScheduleTask.java
File metadata and controls
45 lines (33 loc) · 958 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
41
42
43
44
45
package com.app.model;
import jakarta.persistence.*;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import java.time.LocalDateTime;
@Entity
@Table(name = "schedule")
@Data
@DynamicInsert
@DynamicUpdate
public class ScheduleTask {
@Id
@Column(name = "id", updatable = false, nullable = false)
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(length = 255)
private String name;
@Enumerated(EnumType.STRING)
@Column(nullable = false)
private ScheduleType scheduleType;
@Column
private LocalDateTime scheduleTime;
@Column(columnDefinition = "TEXT", nullable = false)
private String customScheduleDetails;
private LocalDateTime lastRun;
@Column
private LocalDateTime nextRun;
@Column
private Boolean isActive;
@Column(columnDefinition = "TEXT")
private String parameters;
}