Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.schedule.model;

import java.time.LocalDateTime;
import java.time.Instant;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand All @@ -22,10 +22,10 @@ public class Schedule {
private String parameters; // JSON format
private boolean isActive;
private String lastRunStatus;
private LocalDateTime lastRunAt;
private LocalDateTime createdAt;
private Instant lastRunAt;
private Instant createdAt;
private Long createdBy;
private LocalDateTime updatedAt;
private Instant updatedAt;
private Long updatedBy;
private String scheduleText;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.dto;

import java.time.LocalDateTime;
import java.time.Instant;

import lombok.Data;

Expand All @@ -10,9 +10,9 @@ public class JobDto {
private String name;
private String description;
private Boolean isEnabled;
private LocalDateTime createdAt;
private Instant createdAt;
private Long createdBy;
private LocalDateTime updatedAt;
private Instant updatedAt;
private Long updatedBy;

private Integer executionOrder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.dto;

import java.time.LocalDateTime;
import java.time.Instant;

import lombok.Data;

Expand All @@ -10,7 +10,7 @@ public class ScheduleDto {
private String cronExpression;
private Boolean isActive;
private String lastRunStatus;
private LocalDateTime lastRunAt;
private Instant lastRunAt;
private String scheduleText;
private LocalDateTime createdAt;
private Instant createdAt;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.dto;

import java.time.LocalDateTime;
import java.time.Instant;

import com.fasterxml.jackson.databind.JsonNode;

Expand All @@ -14,6 +14,6 @@ public class TaskDto {
private Integer executionOrder;
private JsonNode settings;
private JsonNode parameters;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private Instant createdAt;
private Instant updatedAt;
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package site.icebang.domain.workflow.dto;

import java.math.BigInteger;
import java.time.LocalDateTime;
import java.time.Instant;

import lombok.Data;

Expand All @@ -12,5 +12,5 @@ public class WorkflowCardDto {
private String description;
private boolean isEnabled;
private String createdBy;
private LocalDateTime createdAt;
private Instant createdAt;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.dto;

import java.time.LocalDateTime;
import java.time.Instant;
import java.util.List;
import java.util.Map;

Expand All @@ -9,7 +9,7 @@
@Data
public class WorkflowDetailCardDto extends WorkflowCardDto {
private String defaultConfig;
private LocalDateTime updatedAt;
private Instant updatedAt;
private String updatedBy;
private List<ScheduleDto> schedules;
private List<Map<String, Object>> jobs;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package site.icebang.domain.workflow.dto;

import java.math.BigInteger;
import java.time.LocalDateTime;
import java.time.Instant;

import lombok.Data;

Expand All @@ -11,8 +11,8 @@ public class WorkflowHistoryDTO {
private BigInteger id;
private BigInteger workflowId;
private String traceId;
private LocalDateTime startedAt;
private LocalDateTime finishedAt;
private Instant startedAt;
private Instant finishedAt;
private BigInteger createdBy;
private String triggerType;
private String runNumber;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.model;

import java.time.LocalDateTime;
import java.time.Instant;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand All @@ -17,9 +17,9 @@ public class Job {
private String name;
private String description;
private boolean isEnabled;
private LocalDateTime createdAt;
private Instant createdAt;
private Long createdBy;
private LocalDateTime updatedAt;
private Instant updatedAt;
private Long updatedBy;

public Job(JobDto dto) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.model;

import java.time.LocalDateTime;
import java.time.Instant;

import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -13,15 +13,15 @@ public class JobRun {
private Long workflowRunId;
private Long jobId;
private String status; // PENDING, RUNNING, SUCCESS, FAILED
private LocalDateTime startedAt;
private LocalDateTime finishedAt;
private LocalDateTime createdAt;
private Instant startedAt;
private Instant finishedAt;
private Instant createdAt;

private JobRun(Long workflowRunId, Long jobId) {
this.workflowRunId = workflowRunId;
this.jobId = jobId;
this.status = "RUNNING";
this.startedAt = LocalDateTime.now();
this.startedAt = Instant.now();
this.createdAt = this.startedAt;
}

Expand All @@ -33,6 +33,6 @@ public static JobRun start(Long workflowRunId, Long jobId) {
/** Job 실행 완료 처리 */
public void finish(String status) {
this.status = status;
this.finishedAt = LocalDateTime.now();
this.finishedAt = Instant.now();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.model;

import java.time.LocalDateTime;
import java.time.Instant;

import com.fasterxml.jackson.databind.JsonNode;

Expand All @@ -26,9 +26,9 @@ public class Task {

private JsonNode settings;

private LocalDateTime createdAt;
private Instant createdAt;

private LocalDateTime updatedAt;
private Instant updatedAt;

public Task(TaskDto taskDto) {
this.id = taskDto.getId();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.model;

import java.time.LocalDateTime;
import java.time.Instant;

import lombok.Getter;
import lombok.NoArgsConstructor;
Expand All @@ -15,31 +15,31 @@ public class TaskRun {
private Integer executionOrder;
private String status; // PENDING, RUNNING, SUCCESS, FAILED
private String resultMessage; // 실행 결과 메시지
private LocalDateTime startedAt;
private LocalDateTime finishedAt;
private LocalDateTime createdAt;
private Instant startedAt;
private Instant finishedAt;
private Instant createdAt;

// 생성자나 정적 팩토리 메서드를 통해 객체 생성 로직을 관리
private TaskRun(Long jobRunId, Long taskId) {
this.jobRunId = jobRunId;
this.taskId = taskId;
this.status = "PENDING";
this.createdAt = LocalDateTime.now();
this.createdAt = Instant.now();
}

/** Task 실행 시작을 위한 정적 팩토리 메서드 */
public static TaskRun start(Long jobRunId, Long taskId, Integer executionOrder) {
TaskRun taskRun = new TaskRun(jobRunId, taskId);
taskRun.executionOrder = executionOrder;
taskRun.status = "RUNNING";
taskRun.startedAt = LocalDateTime.now();
taskRun.startedAt = Instant.now();
return taskRun;
}

/** Task 실행 완료 처리 */
public void finish(String status, String resultMessage) {
this.status = status;
this.resultMessage = resultMessage;
this.finishedAt = LocalDateTime.now();
this.finishedAt = Instant.now();
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.model;

import java.time.LocalDateTime;
import java.time.Instant;

import lombok.AccessLevel;
import lombok.AllArgsConstructor;
Expand All @@ -16,9 +16,9 @@ public class Workflow {
private String name;
private String description;
private boolean isEnabled;
private LocalDateTime createdAt;
private Instant createdAt;
private Long createdBy;
private LocalDateTime updatedAt;
private Instant updatedAt;
private Long updatedBy;

/** 워크플로우별 기본 설정값 (JSON) */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package site.icebang.domain.workflow.model;

import java.time.LocalDateTime;
import java.time.Instant;
import java.util.UUID;

import lombok.Getter;
Expand All @@ -14,15 +14,15 @@ public class WorkflowRun {
private Long workflowId;
private String traceId; // 분산 추적을 위한 ID
private String status; // PENDING, RUNNING, SUCCESS, FAILED
private LocalDateTime startedAt;
private LocalDateTime finishedAt;
private LocalDateTime createdAt;
private Instant startedAt;
private Instant finishedAt;
private Instant createdAt;

private WorkflowRun(Long workflowId) {
this.workflowId = workflowId;
this.traceId = UUID.randomUUID().toString(); // 고유 추적 ID 생성
this.status = "RUNNING";
this.startedAt = LocalDateTime.now();
this.startedAt = Instant.now();
this.createdAt = this.startedAt;
}

Expand All @@ -34,6 +34,6 @@ public static WorkflowRun start(Long workflowId) {
/** 워크플로우 실행 완료 처리 */
public void finish(String status) {
this.status = status;
this.finishedAt = LocalDateTime.now();
this.finishedAt = Instant.now();
}
}
Loading
Loading