package com.oqpo.api.enums; import lombok.Getter; import lombok.Setter; public enum PayTpCd { PRE_PAY_CHARGE("10", "선불(충전)"), // AFTER_PAYMENT("20", "후불(결제)"), // AFTER_PRE_PAYMENT("30", "후불(선결제)"), // ; PayTpCd(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) { PayTpCd[] values = PayTpCd.values(); for (PayTpCd icd : values) { if (icd.cd.equals(ccd)) { return icd.name; } } return ccd; } }