local BagData = class("BagData", BaseData)

BagData.RECOVERY_TYPE = {
	TIMELY = 1,
	DAILY = 2,
}

function BagData:ctor()
	self.ItemData = require("app/userdata/bag/item_data"):create()
end

function BagData:init(data)
	if data then
		self.ItemData:init(data)
	else
		self.ItemData:init()
	end
	DataManager:registerDataCd("BagData")
end

function BagData:clear()
	self.ItemData:clear()
	DataManager:unregisterDataCd("BagData")
end

function BagData:updateCd()
	self.ItemData:updateCd()
end

return BagData