package com.ruoyi.project.business.domain.flow;

import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.ruoyi.project.business.domain.system.SysAttachment;
import java.io.Serializable;
import java.util.List;
import javax.validation.constraints.NotNull;
import lombok.Data;

@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class FlowAuditParam implements Serializable {

    @NotNull(message = "业务不能为空")
    private Long auditFlow;

    @NotNull(message = "业务id不能为空")
    private Long businessId;

    private List<Long> businessIds;

    @NotNull(message = "审批结果不能为空")
    private Integer status;

    // 当前审批状态
    private Integer currentStatus;

    private String remark;

    private Long promoter;

    private String auditUser;

    // 通过或驳回时为true
    private boolean finish = false;

    private List<Long> nextAuditUsers;

    private String businessData;

    private List<SysAttachment> attachmentList;

    private JSONObject businessObj;

    // 用于表示当前是审批通过还是审批驳回
    public boolean isPass() {
        return status >= 100;
    }
}
