package com.oqpo.api.enums;

import lombok.Getter;
import lombok.Setter;

public enum WhsDvsn {

    BRAND("W01", "본사"), //
    STORE("W02", "매장"), //
    ;

    WhsDvsn(String cd, String nm) {
        this.cd = cd;
        this.name = nm;
    }

    @Getter
    @Setter
    private String cd;

    @Getter
    @Setter
    private String name;

    public static String getName(String ccd) {
        WhsDvsn[] values = WhsDvsn.values();
        for (WhsDvsn icd : values) {
            if (icd.cd.equals(ccd)) {
                return icd.name;
            }
        }
        return ccd;
    }

}
