package com.jsc.oscm.entity;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import lombok.Data;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

@Entity
@Data
public class Task {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    private String name;
    private String server;
    private String project;
    private String spider;
    private String cron;
    private String status;
    private Date createTime;
    private Integer xxlJobId;
    private String carrierType;
    private String enableFlag;
    private String clusterType; //集群类型
    private String clusterName; //任务所属集群名称，也即采集引擎监听redis队列名
    private String systemFlag;
    private Integer websiteId; //采集任务采集的站点id
    private String nodeIds; //执行采集任务的节点id
    private Integer taskType; //区分单任务单站点还是单任务多站点，0：单任务单站点，1：单任务多站点

    public static final int SINGLE_TASK = 0;
    public static int MULTI_TASK = 1;

}
