package com.sunxung.factoring.component.enums;

/**
 * B端_本金还款方式
 * @author liutao
 * @date 2024-03-18
 */
public enum PrincipalPaymentMethodEnum {

    ONE_TIME_PAYMENT("principalPaymentMethod_A","到期一次性支付"),

    MONTH_PAYMENT("principalPaymentMethod_B","按月支付"),

    QUARTERLY_PAYMENT("principalPaymentMethod_C","按季支付");

    String code;

    String desc;

    PrincipalPaymentMethodEnum(String code, String desc){
        this.code = code;
        this.desc = desc;
    }

    public static PrincipalPaymentMethodEnum getByCode(String code){
        for(PrincipalPaymentMethodEnum ft:values()){
            if(ft.code.equals(code)){
                return ft;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
