Spaces:
Build error
Build error
da-autocompliance-dev
/
src
/main
/java
/com
/dalab
/autocompliance
/model
/entity
/ControlEvaluationJobEntity.java
| package com.dalab.autocompliance.model.entity; | |
| import jakarta.persistence.*; | |
| import lombok.Data; | |
| import lombok.EqualsAndHashCode; | |
| import lombok.NoArgsConstructor; | |
| import lombok.AllArgsConstructor; | |
| import lombok.Builder; | |
| import org.hibernate.annotations.JdbcTypeCode; | |
| import org.hibernate.type.SqlTypes; | |
| import java.time.LocalDateTime; | |
| import java.util.List; | |
| import java.util.Map; | |
| public class ControlEvaluationJobEntity extends AbstractAuditableEntity { | |
| // UUID length | |
| private String jobId; | |
| private String controlId; // Foreign key to ComplianceControlEntity.controlId | |
| private String status; // e.g., QUEUED, PROCESSING, COMPLETED_SUCCESS, COMPLETED_FAILURE, PARTIAL_FAILURE | |
| private LocalDateTime submittedAt; | |
| private LocalDateTime startedAt; | |
| private LocalDateTime completedAt; | |
| private String message; // Overall message for the job execution | |
| // Store targeted asset IDs | |
| private List<String> targetAssetIds; | |
| private Map<String, Object> evaluationParameters; // Parameters used for this specific evaluation run | |
| private boolean forceReevaluation; | |
| private String triggeredBy; | |
| private String notificationEmail; | |
| // In a more detailed model, you might have a list of ControlEvaluationResultEntity linked here. | |
| // For now, the results (findings) would likely be new entries in the main GeneratedReport or a similar table, | |
| // or a dedicated ControlFindingEntity. This part needs further thought based on how results are stored/queried. | |
| // For simplicity, this job entity primarily tracks the execution. | |
| } |