Files
API/TOOHUCardAPI/DTO/GameConfigResponse.cs
2021-10-28 17:03:15 -04:00

35 lines
1.8 KiB
C#

using System;
using System.Text.Json.Serialization;
using Newtonsoft.Json;
namespace TOOHUCardAPI.DTO
{
/**
* GameRules.GameData.code = data.code // "0000" for success
GameRules.GameData.msg = data.msg // error message if any
GameRules.GameData.game_code = data.game_code or "" // Possibly some incrementing value for the room num
GameRules.GameData.game_msg = data.game_msg or "" // message shown on startup
GameRules.GameData.luck_card = data.luck_card or "" // card that luck_crit applies to or "all"
GameRules.GameData.luck_crit = data.luck_crit or 0 // above
GameRules.GameData.new_card_list = data.new_card_list or ""
GameRules.GameData.open_day_list = data.open_day_list or ""
GameRules.GameData.is_open_day = data.is_open_day or 0
GameRules.GameData.server_time = data.server_time
*/
public class GameConfigResponse
{
private static string SUCCESS_CODE = "0000";
private static string DEFAULT_GAME_MESSAGE = "Welcome to english Touhou Card";
[JsonProperty("code")] public string Code { get; set; } = SUCCESS_CODE;
[JsonProperty("msg")] public string Message { get; set; } = string.Empty;
[JsonProperty("game_code")] public string GameCode { get; set; } = string.Empty;
[JsonProperty("game_msg")] public string GameMessage { get; set; } = DEFAULT_GAME_MESSAGE;
[JsonProperty("luck_card")] public string LuckCard { get; set; } = string.Empty;
[JsonProperty("luck_crit")] public float LuckCrit { get; set; }
[JsonProperty("new_card_list")] public string NewCardList { get; set; } = string.Empty;
[JsonProperty("open_day_list")] public string OpenDayList { get; set; } = string.Empty;
[JsonProperty("is_open_day")] public int IsOpenDay { get; set; }
[JsonProperty("server_time")] public string ServerTime { get; set; } = string.Empty;
}
}