package cn.axzo.workflow.common.model.response.bpmn.task;

import cn.axzo.workflow.common.enums.BpmnProcessTaskResultEnum;
import cn.axzo.workflow.common.enums.ButtonVisibleScopeEnum;
import cn.axzo.workflow.common.model.request.bpmn.BpmnButtonMetaInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

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

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BpmnTaskButtonVo implements Serializable {

    private static final long serialVersionUID = -2701890396246979758L;

    /**
     * 执行人任务状态
     */
    @ApiModelProperty(value = "执行人任务执行状态")
    private BpmnProcessTaskResultEnum executorTaskResult;

    /**
     * 发起人执行状态
     */
    @ApiModelProperty(value = "发起人任务执行状态")
    private BpmnProcessTaskResultEnum initiatorTaskResult;

    /**
     * 当前任务执行人以及发起人全量按钮
     */
    @ApiModelProperty(value = "当前任务相关以及发起人的全量按钮")
    private List<BpmnButtonMetaInfoWithVisibleScope> buttons;

    /**
     * 需要隐藏的按钮
     */
    @ApiModelProperty(value = "需要隐藏的自定义按钮")
    private List<BpmnButtonMetaInfo> customHiddenButtons;

    /**
     * 全量的配置按钮
     */
    @ApiModelProperty(value = "全量的配置按钮")
    private List<BpmnButtonMetaInfo> allConfigButtons;

    @Data
    @EqualsAndHashCode(callSuper = true)
    @AllArgsConstructor
    @NoArgsConstructor
    public static final class BpmnButtonMetaInfoWithVisibleScope extends BpmnButtonMetaInfo {

        private static final long serialVersionUID = 5758633314769798044L;

        private List<ButtonVisibleScopeEnum> visibleScopes;
    }
}
