95 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			95 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			C#
		
	
	
	
	
	
using System.Text.Json.Serialization;
 | 
						|
 | 
						|
namespace CFCoreAPI.Endpoints.Games.Responses
 | 
						|
{
 | 
						|
 | 
						|
    public struct GamesResponse
 | 
						|
    {
 | 
						|
        [JsonConstructor]
 | 
						|
        public GamesResponse(
 | 
						|
            List<DataModel> data,
 | 
						|
            PaginationModel pagination
 | 
						|
        )
 | 
						|
        {
 | 
						|
            this.Data = data;
 | 
						|
            this.Pagination = pagination;
 | 
						|
        }
 | 
						|
 | 
						|
        public IReadOnlyList<DataModel> Data { get; }
 | 
						|
        public PaginationModel Pagination { 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; }
 | 
						|
        }
 | 
						|
 | 
						|
        public struct PaginationModel
 | 
						|
        {
 | 
						|
            [JsonConstructor]
 | 
						|
            public PaginationModel(
 | 
						|
                int index,
 | 
						|
                int pageSize,
 | 
						|
                int resultCount,
 | 
						|
                int totalCount
 | 
						|
            )
 | 
						|
            {
 | 
						|
                this.Index = index;
 | 
						|
                this.PageSize = pageSize;
 | 
						|
                this.ResultCount = resultCount;
 | 
						|
                this.TotalCount = totalCount;
 | 
						|
            }
 | 
						|
 | 
						|
            public int Index { get; }
 | 
						|
            public int PageSize { get; }
 | 
						|
            public int ResultCount { get; }
 | 
						|
            public int TotalCount { get; }
 | 
						|
        }
 | 
						|
    }
 | 
						|
 | 
						|
 | 
						|
} |