package com.jiayue.ipfcst.common.data.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.core.annotation.Order;

import javax.persistence.*;
import java.util.Date;

/**
 * Quartz
 *
 * @author bizy
 * @version 1.0
 * @since 2018/12/7 16:22
 */
@Data
@Entity
public class Quartz {

    @Id
    @Order(1)
    @GeneratedValue(strategy = GenerationType.AUTO, generator = "myid")
    @GenericGenerator(name = "myid", strategy = "com.jiayue.ipfcst.common.data.entity.id.CustomIDGenerator")
    private Integer id;
    /*任务名称*/
    @Column(length = 64)
    private String jobName;
    /*任务状态*/
    @Column(length = 64)
    private String jobState;
    /*执行类*/
    @Column(length = 128)
    private String executeClass;
    /*任务描述*/
    @Column(length = 256)
    private String description;
    /*cron时间表达式或轮询时间*/
    @Column(length = 64)
    private String cronExpression;
    /*类型*/
    @Column
    private String jobType;
    /*开始时间*/
    @Column
    private Long startTime;

    /**
     * 场站标识
     */
    @Column
    private String stationCode;

    @Transient
    private Date nextFireTime;//下次执行时间
    @Transient
    private Date prevFireTime;//上次执行时间
    @Transient
    private Date laetFireTime;//最后执行时间


}
