using System.Collections.Generic;
using MessagePack;
#if GameClient
using GameFramework;
#endif

namespace GameMessage
{
    /// <summary>
    /// 俱乐部排行榜信息请求
    /// </summary>
    [Message(MessageCode.ClubLeagueMatchRankListRequest)]
    [MessagePackObject]
    public class ClubLeagueMatchRankListRequest : MessageData
    {
        /// <summary>
        /// 俱乐部ID
        /// </summary>
        [Key(0)] public int ClubId;

        /// <summary>
        /// 比赛Id
        /// </summary>
        [Key(1)] public int ClubMatchId;

#if GameClient

        public static ClubLeagueMatchRankListRequest Create(int clubId,int clubMatchId)
        {
            ClubLeagueMatchRankListRequest request = ReferencePool.Acquire<ClubLeagueMatchRankListRequest>();
            request.ClubId = clubId;
            request.ClubMatchId = clubMatchId;
            return request;
        }

#endif
    }

    /// <summary>
    /// 俱乐部排行榜信息回复
    /// </summary>
    [Message(MessageCode.ClubLeagueMatchRankListResponse)]
    [MessagePackObject]
    public class ClubLeagueMatchRankListResponse : MessageData
    {
        /// <summary>
        /// 俱乐部ID
        /// </summary>
        [Key(0)] public int ClubId;

        /// <summary>
        /// 比赛Id
        /// </summary>
        [Key(1)] public int ClubMatchId;

        /// <summary>
        /// 内容
        /// </summary>
        [Key(2)] public List<ClubMessageRankInfo> List;

        /// <summary>
        /// 总汇总信息
        /// </summary>
        [Key(3)] public LeagueClubStatisticsData TotalStatistics;
    }

    /// <summary>
    /// 排行榜俱乐部信息
    /// </summary>
    [MessagePackObject]
    public class ClubMessageRankInfo
    {
        /// <summary>
        /// 俱乐部Id -账号
        /// </summary>
        [Key(0)] public int ClubId;

        /// <summary>
        /// 俱乐部名字  
        /// </summary>
        [Key(1)] public string ClubName;

        /// <summary>
        /// 统计数据
        /// </summary>
        [Key(2)] public LeagueClubStatisticsData Statistics;
    }
}