package com.oqpo.api.enums;

import lombok.Getter;
import lombok.Setter;

public enum SttlDvsn {

    WHS("SW00", "입고"), //
    RTN("SC00", "수거"), //
    ;

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

}
