package com.oqpo.api.enums;

import lombok.Getter;
import lombok.Setter;

public enum SttlStCd {

    TEMP_SAVE("ST00", "임시저장"), //
    STTL_REQ("ST10", "정산요청"), //
    STTL_CONFIRM("ST20", "정산확정"), //
    STTL_REJECT("ST30", "정산반려"), //
    ;

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

}
