package com.cool.store.enums;

/**
 * @author zhangchenbiao
 * @FileName: AuditStatusEnum
 * @Description:
 * @date 2024-03-20 14:55
 */
public enum AuditStatusEnum {

    TODO(0, "待处理"),
    PASS(1, "通过"),
    REJECT(2, "拒绝");

    private Integer code;

    private String name;

    private AuditStatusEnum(Integer code, String name) {
        this.code = code;
        this.name = name;
    }

    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static AuditStatusEnum getByCode(Integer code) {
        for (AuditStatusEnum auditStatusEnum : AuditStatusEnum.values()) {
            if (auditStatusEnum.getCode().equals(code)) {
                return auditStatusEnum;
            }
        }
        return null;
    }
}
