From c692aa8820a5469cd57a8619215cecd0f37cbcce Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 27 Nov 2021 13:50:42 -0600 Subject: [PATCH] =?UTF-8?q?docs(dir):=20=F0=9F=93=84=20doc=20GET=20license?= =?UTF-8?q?s=20vm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Queries/GetLanguages.cs | 8 ++-- .../Queries/GetLicenses.cs | 48 ++++++++++++++++--- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs b/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs index 3cf7fd037..c2ebc5430 100644 --- a/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs +++ b/services/Directory/FilterLists.Directory.Application/Queries/GetLanguages.cs @@ -50,24 +50,24 @@ public record LanguageVm /// The identifier. /// /// 37 - public long Id { get; init; } + public long Id { get; private init; } /// /// The ISO 639-1 code. /// /// en - public string Iso6391 { get; init; } = default!; + public string Iso6391 { get; private init; } = default!; /// /// The ISO name. /// /// English - public string Name { get; init; } = default!; + public string Name { get; private init; } = default!; /// /// The identifiers of the FilterLists targeted by this Language. /// /// [ 114, 141 ] - public IEnumerable FilterListIds { get; init; } = new HashSet(); + public IEnumerable FilterListIds { get; private init; } = new HashSet(); } } diff --git a/services/Directory/FilterLists.Directory.Application/Queries/GetLicenses.cs b/services/Directory/FilterLists.Directory.Application/Queries/GetLicenses.cs index 9357bd83f..f03e9de12 100644 --- a/services/Directory/FilterLists.Directory.Application/Queries/GetLicenses.cs +++ b/services/Directory/FilterLists.Directory.Application/Queries/GetLicenses.cs @@ -44,12 +44,46 @@ public LicenseVmProfile() public record LicenseVm { - public long Id { get; init; } - public string Name { get; init; } = default!; - public Uri? Url { get; init; } - public bool PermitsModification { get; init; } - public bool PermitsDistribution { get; init; } - public bool PermitsCommercialUse { get; init; } - public IEnumerable FilterListIds { get; init; } = new HashSet(); + /// + /// The identifier. + /// + /// 5 + public long Id { get; private init; } + + /// + /// The name. + /// + /// All Rights Reserved + public string Name { get; private init; } = default!; + + /// + /// The URL of the home page. + /// + /// https://en.wikipedia.org/wiki/All_rights_reserved + public Uri? Url { get; private init; } + + /// + /// If the License permits modification. + /// + /// false + public bool PermitsModification { get; private init; } + + /// + /// If the License permits distribution. + /// + /// false + public bool PermitsDistribution { get; private init; } + + /// + /// If the License permits commercial use. + /// + /// false + public bool PermitsCommercialUse { get; private init; } + + /// + /// The identifiers of the FilterLists released under this License. + /// + /// [ 6, 31 ] + public IEnumerable FilterListIds { get; private init; } = new HashSet(); } }