package com.quyunshuo.androidbaseframemvvm.base.addressenum

import com.quyunshuo.androidbaseframemvvm.base.R

/**
 * 支付枚举
 * code：唯一标识
 * remark：中文名称
 * nameId：名字id
 * imgId：图片id
 * navId：对应的导航
 */
enum class PayEnum(val code:String,val remark:String,val nameId:Int,val imgId:Int,val payType:Int) {
    TWO_CODE("TwoCode","微信支付宝", R.string.base_two_code,R.drawable.quibinary,99),
    BILL_COIN("BillCoin","纸币硬币",R.string.base_bill_coin,R.drawable.pic_toubi_02,3),
    NAYAX("Nayax","Nayax",R.string.base_nayax,R.drawable.pic_shuakazhifu,4),//闲置模式，非闲置模式
    MDB_NO_CASH("MdbNoCash","MDB信用卡",R.string.base_mdb_no_cash,R.drawable.pic_shuakazhifu,4),//级别2，级别3
    SOEPAY("Soepay","Soepay",R.string.base_soepay,R.drawable.pic_shuakazhifu,4),//Soepay
    FREE("Free","免费制作", R.string.base_free_pay,R.drawable.pic_shuakazhifu,0);//无需支付


    companion object {
        fun getEnumByValue(code: String): PayEnum {

            for (anEnum in PayEnum.values()) {
                if (anEnum.code == code) {
                    return anEnum
                }
            }
            return PayEnum.TWO_CODE
        }

    }
}