package com.oqpo.api.enums;

import lombok.Getter;
import lombok.Setter;

public enum InOutCd {

    IN("IN", "입고"), //
    OUT("OUT", "출고"), //
    ;

    InOutCd(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) {
        InOutCd[] values = InOutCd.values();
        for (InOutCd icd : values) {
            if (icd.cd.equals(ccd)) {
                return icd.name;
            }
        }
        return ccd;
    }

}
