-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: msvinaykumar <[email protected]>
- Loading branch information
1 parent
8eac6a6
commit c4e2f6d
Showing
7 changed files
with
121 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
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
29 changes: 29 additions & 0 deletions
29
src/main/java/com/autotune/database/table/lm/JobMetaData.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,29 @@ | ||
package com.autotune.database.table.lm; | ||
|
||
import jakarta.persistence.*; | ||
|
||
@Entity | ||
@Table(name = "kruize_jobmetadata") | ||
public class JobMetaData { | ||
@Id | ||
@GeneratedValue(strategy = GenerationType.IDENTITY) | ||
private Long id; | ||
|
||
@ManyToOne | ||
@JoinColumn(name = "job_id", nullable = false) | ||
private Jobs job; | ||
|
||
@Column(name = "experiment_name") | ||
private String experimentName; | ||
|
||
@Column(columnDefinition = "jsonb") | ||
private String notification; | ||
|
||
@Column(name = "recommendation_status") | ||
private String recommendationsStatus; | ||
|
||
@Column(columnDefinition = "jsonb" , name="recommendation_notifications") | ||
private String recommendationsNotifications; | ||
|
||
// Getters and Setters | ||
} |
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,35 @@ | ||
package com.autotune.database.table.lm; | ||
|
||
import jakarta.persistence.*; | ||
|
||
import java.sql.Timestamp; | ||
import java.util.List; | ||
import java.util.UUID; | ||
|
||
|
||
@Entity | ||
@Table(name = "kruize_jobs") | ||
public class Jobs { | ||
@Id | ||
@Column(name = "job_id") | ||
private UUID jobId; | ||
private String status; | ||
@Column(name = "total_count") | ||
private int totalExperiments; | ||
@Column(name = "processed_count") | ||
private int processedExperiments; | ||
@Column(name = "start_time") | ||
private Timestamp jobStartTime; | ||
@Column(name = "end_time") | ||
private Timestamp jobEndTime; | ||
private String webhook; | ||
|
||
@Column(columnDefinition = "jsonb") | ||
private String notifications; // Stored as JSON string | ||
|
||
@OneToMany(mappedBy = "job", cascade = CascadeType.ALL, fetch = FetchType.LAZY) | ||
@Column(name = "meta_data") | ||
private List<JobMetaData> jobMetaData; | ||
|
||
// Getters and Setters | ||
} |
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