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

namespace GameMessage
{
    /// <summary>
    /// 俱乐部黑名单房间获取请求消息
    /// </summary>
    [Message(MessageCode.ClubBlackRoomGetRequest)]
    [MessagePackObject]
    public class ClubBlackRoomGetRequest : MessageData
    {
        /// <summary>
        /// 俱乐部ID
        /// </summary>
        [Key(0)] public int ClubId;

#if GameClient
        public static ClubBlackRoomGetRequest Create(int clubId)
        {
            ClubBlackRoomGetRequest request = ReferencePool.Acquire<ClubBlackRoomGetRequest>();
            request.ClubId = clubId;
            return request;
        }
#endif
    }

    /// <summary>
    /// 俱乐部黑名单房间获取响应消息
    /// </summary>
    [Message(MessageCode.ClubBlackRoomGetResponse)]
    [MessagePackObject]
    public class ClubBlackRoomGetResponse : MessageData
    {
        /// <summary>
        /// 俱乐部ID
        /// </summary>
        [Key(0)] public int ClubId;

        /// <summary>
        /// 黑名单用户信息列表
        /// </summary>
        [Key(1)] public List<ClubBlackRoomUserInfo> UserInfos;
    }

    /// <summary>
    /// 俱乐部黑名单房间用户信息
    /// </summary>
    [MessagePackObject]
    public class ClubBlackRoomUserInfo
    {
        /// <summary>
        /// 用户ID
        /// </summary>
        [Key(0)] public int UserId;

        /// <summary>
        /// 性别
        /// </summary>
        [Key(1)] public int Sex;

        /// <summary>
        /// 用户昵称
        /// </summary>
        [Key(2)] public string NickName;

        /// <summary>
        /// 是否允许进入游戏, 1为允许,非1为不允许
        /// 保存统一，方便以后其他状态的扩展
        /// </summary>
        [Key(3)] public int InGame;

        /// <summary>
        /// 加入俱乐部时间戳
        /// </summary>
        [Key(4)] public long JoinClubDateTime;

        /// <summary>
        /// 加入方式 --暂时获取不到
        /// </summary>
        [Key(5)] public int JoinStyle;

        /// <summary>
        /// 如果是邀请方式，该字段存储邀请人姓名。如果是会长邀请的该值就是 "会长"
        /// --暂时获取不到
        /// </summary>
        [Key(6)] public string InvitationName;
    }
}