package com.oqpo.api.enums;

import lombok.Getter;
import lombok.Setter;

public enum SttlTargetCd {

    STORE_STTL("S0", "매장정산"), //
    SUPPLY_STTL("S1", "공급사정산"), //
    ;

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

}
