

package com.zcloud.modules.job.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 定时任务日志
 *
 *
 */
@Data
@TableName("schedule_job_log_cmt")
public class ScheduleJobLogEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 日志id
	 */
	@TableId(value = "log_id",type = IdType.ASSIGN_UUID)
	@TableField(value = "log_id")
	@JsonProperty(value = "log_id")
	private String logId;

	/**
	 * 任务id
	 */
	@TableField(value = "job_id")
	@JsonProperty(value = "job_id")
	private String jobId;

	/**
	 * spring bean名称
	 */
	@TableField(value = "bean_name")
	@JsonProperty(value = "bean_name")
	private String beanName;

	/**
	 * 参数
	 */
	@TableField(value = "params")
	@JsonProperty(value = "params")
	private String params;

	/**
	 * 任务状态    0：成功    1：失败
	 */
	@TableField(value = "status")
	@JsonProperty(value = "status")
	private Integer status;

	/**
	 * 失败信息
	 */
	@TableField(value = "error")
	@JsonProperty(value = "error")
	private String error;

	/**
	 * 耗时(单位：毫秒)
	 */
	@TableField(value = "times")
	@JsonProperty(value = "times")
	private Integer times;

	/**
	 * 创建时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(value = "create_time")
	@JsonProperty(value = "create_time")
	private Date createTime;

}
