-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #297 from DFE-Digital/chore/constructor-params
Qualification classes use only mandatory fields in constructors.
- Loading branch information
Showing
11 changed files
with
656 additions
and
595 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 15 additions & 35 deletions
50
src/Dfe.EarlyYearsQualification.Content/Entities/Qualification.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,22 @@ | ||
namespace Dfe.EarlyYearsQualification.Content.Entities; | ||
|
||
public class Qualification | ||
public class Qualification( | ||
string qualificationId, | ||
string qualificationName, | ||
string awardingOrganisationTitle, | ||
int qualificationLevel) | ||
{ | ||
public Qualification( | ||
string qualificationId, | ||
string qualificationName, | ||
string awardingOrganisationTitle, | ||
int qualificationLevel, | ||
string? fromWhichYear, | ||
string? toWhichYear, | ||
string? qualificationNumber, | ||
string? additionalRequirements, | ||
List<AdditionalRequirementQuestion>? additionalRequirementQuestions, | ||
List<RatioRequirement>? ratioRequirements) | ||
{ | ||
QualificationId = qualificationId; | ||
QualificationName = qualificationName; | ||
AwardingOrganisationTitle = awardingOrganisationTitle; | ||
QualificationLevel = qualificationLevel; | ||
FromWhichYear = fromWhichYear; | ||
ToWhichYear = toWhichYear; | ||
QualificationNumber = qualificationNumber; | ||
AdditionalRequirements = additionalRequirements; | ||
AdditionalRequirementQuestions = additionalRequirementQuestions; | ||
RatioRequirements = ratioRequirements; | ||
} | ||
|
||
// Required Fields | ||
public string QualificationId { get; } | ||
public string QualificationName { get; } | ||
public string AwardingOrganisationTitle { get; } | ||
public int QualificationLevel { get; } | ||
public string QualificationId { get; } = qualificationId; | ||
public string QualificationName { get; } = qualificationName; | ||
public string AwardingOrganisationTitle { get; } = awardingOrganisationTitle; | ||
public int QualificationLevel { get; } = qualificationLevel; | ||
|
||
// Optional Fields | ||
public string? FromWhichYear { get; } | ||
public string? ToWhichYear { get; } | ||
public string? QualificationNumber { get; } | ||
public string? AdditionalRequirements { get; } | ||
public List<AdditionalRequirementQuestion>? AdditionalRequirementQuestions { get; } | ||
public List<RatioRequirement>? RatioRequirements { get; } | ||
public string? FromWhichYear { get; init; } | ||
public string? ToWhichYear { get; init; } | ||
public string? QualificationNumber { get; init; } | ||
public string? AdditionalRequirements { get; init; } | ||
public List<AdditionalRequirementQuestion>? AdditionalRequirementQuestions { get; init; } | ||
public List<RatioRequirement>? RatioRequirements { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.