package mt

import (
	"f5"
	"main/mtb"
	"main/constant"
)

type Recharge struct {
	mtb.Recharge
}

type RechargeTable struct {
	f5.IdMetaTable[Recharge]
}

func (this *Recharge) Init1() {
	if this.GetDiamond() <= 0 {
		panic("Recharge diamond <= 0")
		return
	}
	if this.GetPrice() <= 0 {
		panic("Recharge price <= 0")
		return
	}
	if this.GetMaxBuyTimes() <= 0 {
		panic("Recharge max_buy_times <= 0")
		return
	}
	if this.GetMaxBuyTimes() > constant.RECHARGE_CURRENCY_MAX_BUY_NUM {
		panic("Recharge max_buy_times > uplimit")
		return
	}
}
