package com.oqpo.api.enums;

import lombok.Getter;
import lombok.Setter;

public enum PayType {

    STTL_PAY("PT00", "정산지급"), //
    CHARGE_PAYMENT("PT01", "충전결제"), //
	STTL_PAYMENT("PT02", "정산결제"), //
	PRE_PAYMENT("PT03", "선결제"), //
    ;

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

}
