package cn.reghao.tnb.file.app.model.po;

import cn.reghao.jutil.jdk.db.BaseObject;
import cn.reghao.tnb.file.app.delay.DelayJob;
import cn.reghao.tnb.file.app.delay.task.ConvertTaskInfo;
import cn.reghao.tnb.file.app.model.constant.JobStatus;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * @author reghao
 * @date 2024-11-25 09:11:07
 */
@NoArgsConstructor
@Setter
@Getter
public class JobDetail extends BaseObject<Integer> {
    private Long jobId;
    private String jobName;
    private int status;
    private LocalDateTime startAt;
    private LocalDateTime endAt;

    public JobDetail(long jobId, DelayJob delayJob, int status) {
        this.jobId = jobId;
        this.jobName = delayJob.getJobName();
        this.status = status;
        this.startAt = LocalDateTime.now();
    }
}
