local ActEpidemicCommanderOrderData = BaseClass("ActEpidemicCommanderOrderData")

function ActEpidemicCommanderOrderData:__init()
  self:Reset()
end

function ActEpidemicCommanderOrderData:__delete()
  self:Reset()
end

function ActEpidemicCommanderOrderData:Reset()
  self.cfgId = 0
  self.cfg = nil
  self.uid = ""
  self.uuid = 0
  self.cTime = 0
  self.pid = 0
end

function ActEpidemicCommanderOrderData:ParseData(t)
  self.cfgId = tonumber(t.cfgid)
  self.cfg = DataCenter.ActEpidemicZoneManager:GetPingTemplate(self.cfgId)
  self.uid = t.uid
  self.uuid = t.uuid
  self.cTime = t.createinmills
  self.pid = t.pid
end

function ActEpidemicCommanderOrderData:GetEndTime()
  local eTime = self.cTime + self.cfg.world_duration * 1000
  return eTime
end

function ActEpidemicCommanderOrderData:CheckEnd()
  local cTime = UITimeManager:GetInstance():GetServerTime()
  local eTime = self:GetEndTime()
  return cTime >= eTime
end

return ActEpidemicCommanderOrderData
