ExtinctionOnline/ExtinctionOnline.Server/Communication/JsonData.cs
2022-11-04 22:05:08 +09:00

40 lines
1002 B
C#

using System.Text.Json.Serialization;
namespace ExtinctionOnline.Server.Communication
{
public class MessageData
{
[JsonPropertyName("messageType")]
// SYSTEM / GAME
public string? MessageType { get; set; }
[JsonPropertyName("from")]
// SERVER / client-id
public string? From { get; set; }
[JsonPropertyName("roomData")]
public RoomMessageData? RoomDataMessage { get; set; }
[JsonPropertyName("deliveryTo")]
public DeliveryTo? DeliveryTo { get; set; }
}
public class RoomMessageData
{
[JsonPropertyName("roomId")]
public string? RoomId { get; set; }
[JsonPropertyName("roomName")]
public string? RoomName { get; set; }
}
public class DeliveryTo
{
[JsonPropertyName("type")]
// ROOM / CLIENT / SERVER
public string? Type { get; set; }
[JsonPropertyName("clientId")]
public string? ClientId { get; set; }
}
}