From 63d6926799c142ef86104ce7cea07e9394365847 Mon Sep 17 00:00:00 2001 From: plockwood Date: Tue, 7 Nov 2023 16:21:05 +0000 Subject: [PATCH 1/2] folder structure change to coupling of contracts to api version and added pagedDataResponse so it can be shared with client --- .../Establishments/EstablishmentDto.cs | 0 .../V4/PagedDataResponse.cs | 26 +++++++++++++++++++ .../{ => V4}/Trusts/TrustDto.cs | 0 3 files changed, 26 insertions(+) rename academiesContracts/Dfe.Academies.Contracts/{ => V4}/Establishments/EstablishmentDto.cs (100%) create mode 100644 academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs rename academiesContracts/Dfe.Academies.Contracts/{ => V4}/Trusts/TrustDto.cs (100%) diff --git a/academiesContracts/Dfe.Academies.Contracts/Establishments/EstablishmentDto.cs b/academiesContracts/Dfe.Academies.Contracts/V4/Establishments/EstablishmentDto.cs similarity index 100% rename from academiesContracts/Dfe.Academies.Contracts/Establishments/EstablishmentDto.cs rename to academiesContracts/Dfe.Academies.Contracts/V4/Establishments/EstablishmentDto.cs diff --git a/academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs b/academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs new file mode 100644 index 0000000..dcb3964 --- /dev/null +++ b/academiesContracts/Dfe.Academies.Contracts/V4/PagedDataResponse.cs @@ -0,0 +1,26 @@ +namespace Dfe.Academies.Contracts.V4; +using System.Collections.Generic; + +public class PagedDataResponse where TResponse : class +{ + + public IEnumerable Data { get; set; } + public PagingResponse Paging { get; set; } + + public PagedDataResponse() => Data = new List(); + + public PagedDataResponse(IEnumerable data, PagingResponse pagingResponse) + { + Data = data; + Paging = pagingResponse; + } + + public PagedDataResponse(TResponse data) => Data = new List { data }; + +} +public class PagingResponse +{ + public int Page { get; set; } + public int RecordCount { get; set; } + public string NextPageUrl { get; set; } +} diff --git a/academiesContracts/Dfe.Academies.Contracts/Trusts/TrustDto.cs b/academiesContracts/Dfe.Academies.Contracts/V4/Trusts/TrustDto.cs similarity index 100% rename from academiesContracts/Dfe.Academies.Contracts/Trusts/TrustDto.cs rename to academiesContracts/Dfe.Academies.Contracts/V4/Trusts/TrustDto.cs From 7125870c0fab15f96f05ecfe6212b1a4beaa2c24 Mon Sep 17 00:00:00 2001 From: plockwood Date: Tue, 7 Nov 2023 16:22:34 +0000 Subject: [PATCH 2/2] version bump to 1.0.3 --- .../Dfe.Academies.Contracts/Dfe.Academies.Contracts.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/academiesContracts/Dfe.Academies.Contracts/Dfe.Academies.Contracts.csproj b/academiesContracts/Dfe.Academies.Contracts/Dfe.Academies.Contracts.csproj index 84c1daf..0553c02 100644 --- a/academiesContracts/Dfe.Academies.Contracts/Dfe.Academies.Contracts.csproj +++ b/academiesContracts/Dfe.Academies.Contracts/Dfe.Academies.Contracts.csproj @@ -11,7 +11,7 @@ README.md https://github.com/DFE-Digital/academisation-nuget-packages git - 1.0.2 + 1.0.3