using System;
using LitJson;

namespace Wizard;

public class PlayedTogetherHistory : HeaderData
{
	public const int FRIEND_STATUS_NO_ACTION = 0;

	public const int FRIEND_STATUS_IS_FRIEND = 1;

	public const int FRIEND_STATUS_IS_SEND = 2;

	public const int FRIEND_STATUS_IS_RECEIVED = 3;

	public int ViewerId;

	public string Name;

	public string CountryCode;

	public int Rank;

	public long EmblemId;

	public int DegreeId;

	public DateTime LastPlayTime;

	public int FriendStatus;

	public DateTime PlayedTime;

	public int ApplyId;

	public BattleParameter BattleParameter;

	public PlayedTogetherHistory(JsonData data)
	{
		ViewerId = data["viewer_id"].ToInt();
		Name = data["name"].ToString();
		CountryCode = data["country_code"].ToString();
		Rank = data["rank"].ToInt();
		EmblemId = data["emblem_id"].ToLong();
		DegreeId = data["degree_id"].ToInt();
		LastPlayTime = DateTime.Parse(data["last_play_time"].ToString());
		FriendStatus = data["friend_status"].ToInt();
		PlayedTime = DateTime.Parse(data["played_time"].ToString());
		ApplyId = data["friend_apply_id"].ToInt();
		BattleParameter = BattleParameter.JsonToBattleParameter(data);
	}
}
