Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Feature/academies api contracts #9

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/DFE-Digital/academisation-nuget-packages</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
26 changes: 26 additions & 0 deletions academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
namespace Dfe.Academies.Contracts.V4;
using System.Collections.Generic;

public class PagedDataResponse<TResponse> where TResponse : class
{

public IEnumerable<TResponse> Data { get; set; }
public PagingResponse Paging { get; set; }

public PagedDataResponse() => Data = new List<TResponse>();

public PagedDataResponse(IEnumerable<TResponse> data, PagingResponse pagingResponse)
{
Data = data;
Paging = pagingResponse;
}

public PagedDataResponse(TResponse data) => Data = new List<TResponse> { data };

}
public class PagingResponse
{
public int Page { get; set; }
public int RecordCount { get; set; }
public string NextPageUrl { get; set; }

Check warning on line 25 in academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable property 'NextPageUrl' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
}
Loading