package cn.axzo.workflow.common.model.request.bpmn;

import cn.axzo.workflow.common.enums.BpmnProcessInstanceResultEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

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

/**
 * 站内信
 *
 * @author wangli
 * @since 2023/12/2 18:36
 */
@ApiModel("JSON 版本的 BPMN 协议模型中的通知管理的站内信")
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class BpmnNoticeProperty implements Serializable {

    /**
     * 通知的消息模板,该属性目前是由后端进行配置,前端暂可不关心
     */
    @ApiModelProperty(value = "通知的消息模板", hidden = true)
    private String noticeMessageId;
    /**
     * 是否发送消息通知
     */
    @ApiModelProperty(value = "是否发送消息通知")
    private Boolean sendMessage;

    /**
     * 消息触发时机列表
     */
    @ApiModelProperty(value = "触发时机列表")
    private List<BpmnProcessInstanceResultEnum> triggerEvents = new ArrayList<>();

    /**
     * 消息模版发起人配置
     */
    @ApiModelProperty(value = "消息模版发起人配置")
    private BpmnNoticeReceiver initiator = new BpmnNoticeReceiver();

    /**
     * 消息历史审批配置
     */
    @ApiModelProperty(value = "消息模版历史审批人配置")
    private BpmnNoticeReceiver histories = new BpmnNoticeReceiver();

    /**
     * 消息模版指定岗位配置
     */
    @ApiModelProperty(value = "消息模版指定岗位配置")
    private BpmnNoticeReceiver positions = new BpmnNoticeReceiver();

    /**
     * 消息模版指定角色配置
     */
    @ApiModelProperty(value = "消息模版指定角色配置")
    private BpmnNoticeReceiver roles = new BpmnNoticeReceiver();

    /**
     * 消息模板指定人员
     */
    @ApiModelProperty(value = "消息模板指定人员")
    private BpmnNoticeReceiver assigners = new BpmnNoticeReceiver();
}
