package com.ruoyi.cron.document;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 数据处理日志
 */
@Data
@Document
public class CronTaskLog {

  @Id
  private Long id;

  @Indexed
  private Integer groupId;

  @Indexed
  private String taskId;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @Indexed
  private Date startTime;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date endTime;

  private String params;

  @Indexed
  private Boolean ok;

  private String msg;

  private String ex;

}
