local ActWinterStormLogData = BaseClass("ActWinterStormLogData")
local TeamArr = require("DataCenter.ActWinterStormManager.TeamArr")

function ActWinterStormLogData:__init()
  self.time = 0
  self.isWin = false
  self.mvpId = 0
  self.team = nil
end

function ActWinterStormLogData:__delete()
  self.time = 0
  self.isWin = false
  self.mvpId = 0
  self.team = nil
end

function ActWinterStormLogData:ParseData(message)
  if message == nil then
    return
  end
  if message.battleBeginTime ~= nil then
    self.time = message.battleBeginTime
  end
  if message.isWin ~= nil then
    self.isWin = message.isWin
  end
  if message.mvpId ~= nil then
    self.mvpId = message.mvpId
  end
  if message.team ~= nil then
    self.team = {}
    local arr = message.team
    for i, v in ipairs(arr) do
      local oneData = TeamArr.New()
      oneData:ParseData(v)
      self.team[i] = oneData
    end
  end
end

return ActWinterStormLogData
