69 lines
1.7 KiB
C#
69 lines
1.7 KiB
C#
|
using System.Text.Json.Serialization;
|
||
|
|
||
|
namespace CFCoreAPI.Endpoints.Games.Responses
|
||
|
{
|
||
|
public struct GameResponse
|
||
|
{
|
||
|
[JsonConstructor]
|
||
|
public GameResponse(
|
||
|
DataModel data
|
||
|
)
|
||
|
{
|
||
|
this.Data = data;
|
||
|
}
|
||
|
|
||
|
public DataModel Data { get; }
|
||
|
|
||
|
public struct AssetsModel
|
||
|
{
|
||
|
[JsonConstructor]
|
||
|
public AssetsModel(
|
||
|
string iconUrl,
|
||
|
string tileUrl,
|
||
|
string coverUrl
|
||
|
)
|
||
|
{
|
||
|
this.IconUrl = iconUrl;
|
||
|
this.TileUrl = tileUrl;
|
||
|
this.CoverUrl = coverUrl;
|
||
|
}
|
||
|
|
||
|
public string IconUrl { get; }
|
||
|
public string TileUrl { get; }
|
||
|
public string CoverUrl { get; }
|
||
|
}
|
||
|
|
||
|
public struct DataModel
|
||
|
{
|
||
|
[JsonConstructor]
|
||
|
public DataModel(
|
||
|
int id,
|
||
|
string name,
|
||
|
string slug,
|
||
|
DateTime dateModified,
|
||
|
AssetsModel assets,
|
||
|
int status,
|
||
|
int apiStatus
|
||
|
)
|
||
|
{
|
||
|
this.Id = id;
|
||
|
this.Name = name;
|
||
|
this.Slug = slug;
|
||
|
this.DateModified = dateModified;
|
||
|
this.Assets = assets;
|
||
|
this.Status = status;
|
||
|
this.ApiStatus = apiStatus;
|
||
|
}
|
||
|
|
||
|
public int Id { get; }
|
||
|
public string Name { get; }
|
||
|
public string Slug { get; }
|
||
|
public DateTime DateModified { get; }
|
||
|
public AssetsModel Assets { get; }
|
||
|
public int Status { get; }
|
||
|
public int ApiStatus { get; }
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|