package com.qmth.distributed.print.business.bean.result;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.distributed.print.business.bean.flow.CustomFlowApproveRoleDto;
import com.qmth.distributed.print.business.enums.CustomFlowApproveUserCountTypeEnum;
import com.qmth.distributed.print.business.enums.CustomFlowApproveUserSelectRangeEnum;
import com.qmth.distributed.print.business.enums.CustomFlowApproveUserTypeEnum;
import com.qmth.teachcloud.common.enums.TFCustomModelTypeEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 流程节点result
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/8/6
 */
public class FlowTaskResult implements Serializable {

    @ApiModelProperty(value = "流程id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long flowId;

    @ApiModelProperty(value = "流程节点名称")
    private String taskName;

    @ApiModelProperty(value = "流程节点key")
    private String taskKey;

    @ApiModelProperty(value = "流程节点步骤")
    private Integer setup;

    @ApiModelProperty(value = "审批人id")
    List<String> approveIds;

    @ApiModelProperty(value = "审批人")
    String approveUserNames;

    @ApiModelProperty(value = "审批角色ids")
    List<String> approveRoleIds;

    @ApiModelProperty(value = "属性")
    CustomFlowApproveUserTypeEnum approveUserType;

    @ApiModelProperty(value = "流程模式")
    TFCustomModelTypeEnum modelType;

    @ApiModelProperty(value = "自定义流程发起人指定选择人数")
    CustomFlowApproveUserCountTypeEnum approveUserCountType;

    @ApiModelProperty(value = "自定义流程发起人指定选择用户类型")
    CustomFlowApproveUserSelectRangeEnum approveUserSelectRange;

    @ApiModelProperty(value = "自定义流程发起人指定审批角色列表")
    List<CustomFlowApproveRoleDto> approveUserSelectRoles;

    public FlowTaskResult() {

    }

    public FlowTaskResult(String taskName, String taskKey, Integer setup) {
        this.taskName = taskName;
        this.taskKey = taskKey;
        this.setup = setup;
    }

    public FlowTaskResult(String taskName, String taskKey, Integer setup, TFCustomModelTypeEnum modelType) {
        this.taskName = taskName;
        this.taskKey = taskKey;
        this.setup = setup;
        this.modelType = modelType;
    }

    public FlowTaskResult(Long flowId,
                          String taskName,
                          String taskKey,
                          Integer setup) {
        this.flowId = flowId;
        this.taskName = taskName;
        this.taskKey = taskKey;
        this.setup = setup;
    }

    public void setInfo(List<String> approveRoleIds,
                        CustomFlowApproveUserTypeEnum approveUserType,
                        TFCustomModelTypeEnum modelType,
                        CustomFlowApproveUserCountTypeEnum approveUserCountType,
                        CustomFlowApproveUserSelectRangeEnum approveUserSelectRange,
                        List<CustomFlowApproveRoleDto> approveUserSelectRoles) {
        this.approveRoleIds = approveRoleIds;
        this.approveUserType = approveUserType;
        this.modelType = modelType;
        this.approveUserCountType = approveUserCountType;
        this.approveUserSelectRange = approveUserSelectRange;
        this.approveUserSelectRoles = approveUserSelectRoles;
    }

    public List<String> getApproveIds() {
        return approveIds;
    }

    public void setApproveIds(List<String> approveIds) {
        this.approveIds = approveIds;
    }

    public TFCustomModelTypeEnum getModelType() {
        return modelType;
    }

    public void setModelType(TFCustomModelTypeEnum modelType) {
        this.modelType = modelType;
    }

    public CustomFlowApproveUserCountTypeEnum getApproveUserCountType() {
        return approveUserCountType;
    }

    public void setApproveUserCountType(CustomFlowApproveUserCountTypeEnum approveUserCountType) {
        this.approveUserCountType = approveUserCountType;
    }

    public CustomFlowApproveUserSelectRangeEnum getApproveUserSelectRange() {
        return approveUserSelectRange;
    }

    public void setApproveUserSelectRange(CustomFlowApproveUserSelectRangeEnum approveUserSelectRange) {
        this.approveUserSelectRange = approveUserSelectRange;
    }

    public List<CustomFlowApproveRoleDto> getApproveUserSelectRoles() {
        return approveUserSelectRoles;
    }

    public void setApproveUserSelectRoles(List<CustomFlowApproveRoleDto> approveUserSelectRoles) {
        this.approveUserSelectRoles = approveUserSelectRoles;
    }

    public List<String> getApproveRoleIds() {
        return approveRoleIds;
    }

    public void setApproveRoleIds(List<String> approveRoleIds) {
        this.approveRoleIds = approveRoleIds;
    }

    public CustomFlowApproveUserTypeEnum getApproveUserType() {
        return approveUserType;
    }

    public void setApproveUserType(CustomFlowApproveUserTypeEnum approveUserType) {
        this.approveUserType = approveUserType;
    }

    public String getApproveUserNames() {
        return approveUserNames;
    }

    public void setApproveUserNames(String approveUserNames) {
        this.approveUserNames = approveUserNames;
    }

    public Long getFlowId() {
        return flowId;
    }

    public void setFlowId(Long flowId) {
        this.flowId = flowId;
    }

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskKey() {
        return taskKey;
    }

    public void setTaskKey(String taskKey) {
        this.taskKey = taskKey;
    }

    public Integer getSetup() {
        return setup;
    }

    public void setSetup(Integer setup) {
        this.setup = setup;
    }
}
