DTOs for index mostly done, doing DB models

This commit is contained in:
gamer147
2024-09-12 00:35:31 -04:00
parent ac3b002d74
commit 79505e0c1a
69 changed files with 1523 additions and 21 deletions

View File

@@ -0,0 +1,18 @@
using MessagePack;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Internal;
[MessagePackObject]
public class DataHeaders
{
[Key("short_udid")]
public ulong ShortUdid { get; set; }
[Key("viewer_id")]
public ulong ViewerId { get; set; }
[Key("sid")]
public string Sid { get; set; }
[Key("servertime")]
public long Servertime { get; set; }
[Key("result_code")]
public int ResultCode { get; set; }
}

View File

@@ -0,0 +1,22 @@
using MessagePack;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Internal;
/// <summary>
/// Wraps responses in the format the official game client expects, with a header section for additional data. Not for manual endpoint use, this wrapping is done automatically in a middleware.
/// </summary>
[MessagePackObject]
public class DataWrapper
{
/// <summary>
/// Additional data about the request, response and user.
/// </summary>
[Key("data_headers")]
public DataHeaders DataHeaders { get; set; } = new DataHeaders();
/// <summary>
/// The response data from the endpoint.
/// </summary>
[Key("data")]
public object Data { get; set; } = new();
}