package com.ym.mec.education.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 任务调度表
 * </p>
 *
 * @author lemeng
 * @since 2019-09-25
 */
@TableName("sys_task")
public class SysTask extends Model<SysTask> {

    private static final long serialVersionUID = 1L;

    /**
     * 任务id，主键
     */
    @TableId("id_")
    private Integer id;
    /**
     * 任务名称
     */
    @TableField("name_")
    private String name;
    /**
     * 任务所属分组
     */
    @TableField("group_")
    private String group;
    /**
     * 具体任务接口
     */
    @TableField("job_class_")
    private String jobClass;
    /**
     * 任务执行的时间表达式
     */
    @TableField("time_exp_")
    private String timeExp;
    /**
     * 状态（-1，执行失败；0，暂停；1，准备就绪；2，执行中；3，执行成功）
     */
    @TableField("status_")
    private Integer status;
    /**
     * 任务描述
     */
    @TableField("description_")
    private String description;
    /**
     * 创建时间
     */
    @TableField("create_on_")
    private Date createOn;
    /**
     * 修改时间
     */
    @TableField("modify_on_")
    private Date modifyOn;


    public Integer getId() {
        return id;
    }

    public SysTask setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public SysTask setName(String name) {
        this.name = name;
        return this;
    }

    public String getGroup() {
        return group;
    }

    public SysTask setGroup(String group) {
        this.group = group;
        return this;
    }

    public String getJobClass() {
        return jobClass;
    }

    public SysTask setJobClass(String jobClass) {
        this.jobClass = jobClass;
        return this;
    }

    public String getTimeExp() {
        return timeExp;
    }

    public SysTask setTimeExp(String timeExp) {
        this.timeExp = timeExp;
        return this;
    }

    public Integer getStatus() {
        return status;
    }

    public SysTask setStatus(Integer status) {
        this.status = status;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public SysTask setDescription(String description) {
        this.description = description;
        return this;
    }

    public Date getCreateOn() {
        return createOn;
    }

    public SysTask setCreateOn(Date createOn) {
        this.createOn = createOn;
        return this;
    }

    public Date getModifyOn() {
        return modifyOn;
    }

    public SysTask setModifyOn(Date modifyOn) {
        this.modifyOn = modifyOn;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "SysTask{" +
        ", id=" + id +
        ", name=" + name +
        ", group=" + group +
        ", jobClass=" + jobClass +
        ", timeExp=" + timeExp +
        ", status=" + status +
        ", description=" + description +
        ", createOn=" + createOn +
        ", modifyOn=" + modifyOn +
        "}";
    }
}
