package com.yunzhupaas.flowable.model.message;

import com.yunzhupaas.flowable.entity.CirculateEntity;
import com.yunzhupaas.flowable.entity.OperatorEntity;
import com.yunzhupaas.flowable.entity.TaskEntity;
import com.yunzhupaas.flowable.entity.TemplateNodeEntity;
import com.yunzhupaas.flowable.model.task.FlowModel;
import com.yunzhupaas.flowable.model.templatenode.nodejson.MsgConfig;
import com.yunzhupaas.flowable.model.util.FlowNature;
import com.yunzhupaas.permission.entity.UserEntity;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author ：云筑产品开发平台组
 * @version: V3.1.0
 * @copyright 深圳市乐程软件有限公司
 * @date ：2024/4/25 下午1:49
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
public class FlowMsgModel {
    private Boolean startHandId = false;
    private FlowModel flowModel = new FlowModel();
    private TaskEntity taskEntity = new TaskEntity();
    private String nodeCode;
    private List<TemplateNodeEntity> nodeList = new ArrayList<>();
    private List<OperatorEntity> operatorList = new ArrayList<>();
    private List<CirculateEntity> circulateList = new ArrayList<>();
    private Map<String, Map<String, Object>> formData = new HashMap<>();
    /**
     * 代办 (通知代办)
     */
    private Boolean wait = true;
    /**
     * 同意
     */
    private Boolean approve = false;
    /**
     * 退回
     */
    private Boolean back = false;
    /**
     * 抄送人
     */
    private Boolean copy = false;
    /**
     * 结束 (通知发起人)
     */
    private Boolean end = false;
    /**
     * 子流程通知
     */
    private Boolean launch = false;
    /**
     * 拒绝发起节点
     */
    private Boolean start = false;
    /**
     * 超时
     */
    private Boolean overtime = false;
    /**
     * 提醒
     */
    private Boolean notice = false;
    /**
     * 评论
     */
    private Boolean comment = false;
    /**
     * 拒绝
     */
    private Boolean reject = false;

    private Boolean transfer = false;
    private Boolean assign = false;
    private Boolean press = false;

    /**
     * 消息类型
     */
    private MsgConfig msgConfig = new MsgConfig();
    /**
     * 审批类型
     */
    private String opType = FlowNature.LaunchCreate;
    /**
     * 节点数据
     */
    private Map<String, Object> data = new HashMap<>();
    /**
     * 审批人
     */
    private List<String> userList = new ArrayList<>();
    /**
     *
     */
    private Map<String, String> contMsg = new HashMap<>();

    /**
     * 创建人
     */
    private UserEntity createUser;
    /**
     * 委托人
     */
    private UserEntity delegate;
}

