using Model.Entity.BaseModel;
using System;
using System.Collections.Generic;
namespace Assets.MyGame.Scripts.Net.WebResponses.ChineseChess
{
[Serializable]
public class ChineseChessGameClassList
{
///
/// 创建房间参数
///
public class CreateRoomParam
{
///
/// 房间id
///
public string roomId { get; set; }
///
/// 用户ID
///
public string userId { get; set; }
///
/// 游戏类型 1 我方黑 2 我方红
///
public int gameType { get; set; }
///
/// 密码,可为空字符串
///
public string password { get; set; }
///
/// 金币数量
///
public int gold { get; set; } = 1000;
}
[Serializable]
///
/// 游戏房间
///
public class ChessGameRoom : MongoBaseEntity
{
///
/// 用户列表
///
public List users { get; set; } = new List();
///
/// 房间id
///
public string roomId { get; set; }
///
/// 创建时间
///
public DateTime createTime { get; set; }
///
/// 游戏类型 1 房主黑 2 房主红
///
public int gameType { get; set; }
///
/// 密码,可为空字符串
///
public string password { get; set; }
///
/// 创建者id
///
public string createUserId { get; set; }
///
/// 状态 1 未开始 2 进行中 3 已结束
///
public int state { get; set; } = 1;
///
/// 金币数量
///
public int gold { get; set; } = 1000;
}
[Serializable]
///
/// 缓存中的游戏用户模型
///
public class RedisGameUser
{
///
/// 链接Id
///
public string cid { get; set; }
///
/// 用户ID
///
public string userId { get; set; }
///
/// 用户名称
///
public string userName { get; set; }
///
/// 用户头像
///
public string userAvatar { get; set; }
///
/// 用户类型 1 黑方 2 红方
///
public int type { get; set; }
///
/// 是否掉线
///
public bool isLeave { get; set; } = false;
///
/// 是否准备
///
public bool isReady { get; set; } = false;
///
/// 金币数量
///
public int gold { get; set; } = 0;
}
}
}