package com.gci.boot.modules.vehicles.enums;

import lombok.Getter;

public enum UpkeepPlanStatusEnumLeader {

    //领导 -- 作废、编辑、查看、审核
    //员工   编辑、查看
    //1-未审核，2-审核通过，3-审核未通过，4-已作废, 5-已归档

    // 审核状态   1-》有， 2-》无
    // 查看 作废 编辑 审核

    /**
     * 未审核
     */
    NO_CHECK("1",2,1,1,1),

    /**
     * 审核通过
     */
    CHECK_PASS("2",1,2,2,2),


    /**
     * 审核未通过
     */
    CHECK_NO_PASS("3",2,1,1,2),

    /**
     * 已作废
     */
    CANCEL("4",1,2,2,2),

    /**
     * 已归档
     */
    FINISH("5",1,2,2,2)
    ;
    /**
     * 维修状态
     */
    @Getter
    private String auditStatus;

    @Getter
    private Integer checkButton;

    @Getter
    private Integer deleteButton;

    @Getter
    private Integer editButton;
    // 审核按钮 1-有 2-没有
    @Getter
    private Integer auditButton;


    UpkeepPlanStatusEnumLeader(String auditStatus, Integer checkButton, Integer deleteButton,
                               Integer editButton, Integer auditButton) {
        this.auditStatus = auditStatus;
        this.checkButton = checkButton;
        this.deleteButton = deleteButton;
        this.editButton = editButton;
        this.auditButton = auditButton;
    }

    public static UpkeepPlanStatusEnumLeader getEnum(String auditStatus){
        for (UpkeepPlanStatusEnumLeader statusEnum : UpkeepPlanStatusEnumLeader.values()) {
            if (statusEnum.getAuditStatus().equals(auditStatus)) {
                return statusEnum;
            }
        }
        return null;
    }


}
