package com.yihu.jw.entity.job;

import org.hibernate.annotations.GenericGenerator;

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

/**
 * QuartzJobLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wlyy_job_log")
public class QuartzJobLog implements java.io.Serializable {

	private String id;
	private Date jobStartTime;  //任务开始执行时间
	private Date jobEndTime;    //任务结束时间
	private String jobId;       //任务id
	private String jobName;     //任务名称
	private String jobContent;  //任务执行情况
	private String jobType;     // 1成功 0失败

    public QuartzJobLog(){}

	public QuartzJobLog(String jobId) {
		this.jobId = jobId;
	}

	public QuartzJobLog(Timestamp jobStartTime, Timestamp jobEndTime,
                        String jobId, String jobContent, String jobType) {
		this.jobStartTime = jobStartTime;
		this.jobEndTime = jobEndTime;
		this.jobId = jobId;
		this.jobContent = jobContent;
		this.jobType = jobType;
	}

	@GenericGenerator(name = "generator", strategy = "uuid")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false, length = 50)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "job_start_time", length = 0)
	public Date getJobStartTime() {
		return this.jobStartTime;
	}

	public void setJobStartTime(Date jobStartTime) {
		this.jobStartTime = jobStartTime;
	}

	@Column(name = "Job_end_time", length = 0)
	public Date getJobEndTime() {
		return this.jobEndTime;
	}

	public void setJobEndTime(Date jobEndTime) {
		this.jobEndTime = jobEndTime;
	}

	@Column(name = "job_id", nullable = false, length = 50)
	public String getJobId() {
		return this.jobId;
	}

	public void setJobId(String jobId) {
		this.jobId = jobId;
	}

	@Column(name = "job_content", length = 1000)
	public String getJobContent() {
		return this.jobContent;
	}

	public void setJobContent(String jobContent) {
		this.jobContent = jobContent;
	}

	@Column(name = "job_type", length = 1)
	public String getJobType() {
		return this.jobType;
	}

	public void setJobType(String jobType) {
		this.jobType = jobType;
	}

	@Column(name = "job_name", length = 200)
	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}
}