package com.ruoyi.ss.riskInfo.domain.enums;

import com.ruoyi.common.utils.collection.CollectionUtils;
import com.ruoyi.ss.model.domain.enums.ModelTag;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.util.List;

/**
 * @author wjh
 * 2024/11/25
 */
@Getter
@AllArgsConstructor
public enum RiskInfoStatus {

    WAIT_SUBMIT("1", "未提交"),
    WAIT_VERIFY("2", "待审核"),
    PASS("3", "已通过"),
    REJECT("4", "未通过");

    private final String status;
    private final String desc;

    public static List<String> asList(RiskInfoStatus ...statuses) {
        return CollectionUtils.map(RiskInfoStatus::getStatus, statuses);
    }

    /**
     * 允许审核的状态
     */
    public static List<String> canVerify() {
        return asList(WAIT_VERIFY);
    }

    /**
     * 允许提交的状态
     */
    public static List<String> canSubmit() {
        return asList(WAIT_SUBMIT);
    }

    /**
     * 允许修改的状态
     */
    public static List<String> canUpdate() {
        return asList(WAIT_SUBMIT);
    }
}
