package cn.axzo.msg.center.service.pending.request;

import cn.axzo.msg.center.service.enums.BizFinalStateEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

import javax.validation.constraints.NotEmpty;
import java.util.List;

@Data
@Slf4j
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CompletePendingMessageByCodesRequest {

    /**
     * 待办IdentityCode列表
     */
    @NotEmpty
    private List<String> identityCodes;

    /**
     * 整个流程是否完结，注：审批待办完结后传true
     */
    private Boolean finalStatus;

    /**
     * 业务终态的状态枚举
     */
    private BizFinalStateEnum bizFinalStateEnum;

    public boolean determineUpdateFinalBizState() {
        return finalStatus != null && finalStatus && bizFinalStateEnum != null;
    }

}
