using System.ComponentModel.DataAnnotations.Schema; using MongoDB.Bson.Serialization.Attributes; using MongoRepository; using MongoRepository.Attributes; using MongoRepository.Config; namespace ChessGameDomain { [BsonCollection("game_room", ServiceDatabases.Chess)] [BsonIgnoreExtraElements] public class ChessGameRoom : MongoBaseEntity { [Column(TypeName = "jsonb")] public List users { get; set; } = new List(); public string RoomId { get; set; } public DateTime CreateTime { get; set; } public int gameType { get; set; } public string password { get; set; } public string createUserId { get; set; } public int state { get; set; } = 1; public long gold { get; set; } = 1000; public int robotCount { get; set; } = 0; public Dictionary EndGameRequests { get; set; } = new Dictionary(); public long LastActiveTime { get; set; } = 0; public int TimeoutSeconds { get; set; } = 60; public int AfkTimeoutSeconds { get; set; } = 120; public string TimeoutLoserUserId { get; set; } = ""; public string PendingWinUserId { get; set; } = ""; public bool IsGameEnded { get; set; } = false; } }