package com.bonus.material.task.domain;

import com.bonus.common.core.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import com.bonus.common.core.web.domain.BaseEntity;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 任务对象 tm_task
 * @author syruan
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ToString
@Accessors(chain = true)
public class TmTask extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** 任务ID */
    private Long taskId;

    /** 上个阶段的任务ID */
    @ApiModelProperty(value = "上个阶段的任务ID")
    private Long preTaskId;

    /** 任务类型(定义数据字典) */
    @Excel(name = "任务类型(定义数据字典)")
    @ApiModelProperty(value = "任务类型(定义数据字典)")
    private Integer taskType;

    @ApiModelProperty(value = "任务所属分公司id")
    private Long taskDeptId;

    @ApiModelProperty(value = "领料分任务类型(定义数据字典)")
    private Integer splitType;

    /** 任务状态(定义数据字典) */
    @Excel(name = "任务状态(定义数据字典)")
    @ApiModelProperty(value = "任务状态(定义数据字典)")
    private Integer taskStatus;

    /** 编号 */
    @Excel(name = "任务编号")
    @ApiModelProperty(value = "任务编号，如新购单号，领料单号，退料单号等")
    private String code;

    /** 数据所属组织 */
    @Excel(name = "数据所属组织")
    @ApiModelProperty(value = "数据所属组织")
    private Long companyId;

    @ApiModelProperty(value = "任务当月序号 例如:1 插入及查询时请携带任务类型")
    private Integer monthOrder;

    public TmTask(Long taskId, Integer taskType, Integer taskStatus, Long companyId, Integer monthOrder, String code) {
        this.taskId = taskId;
        this.taskType = taskType;
        this.taskStatus = taskStatus;
        this.companyId = companyId;
        this.monthOrder = monthOrder;
        this.code = code;
    }

    public TmTask() {}
}
