Skip to content

Commit

Permalink
update criminal history mapping (#752)
Browse files Browse the repository at this point in the history
# Description

This PR includes the following proposed change(s):

- update criminal history mapping
  • Loading branch information
peggy-quartech authored Feb 7, 2024
1 parent 16ad17a commit 8cf4ca0
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 60 deletions.
4 changes: 2 additions & 2 deletions src/Spd.Resource.Repository/LicenceApplication/Mappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public Mappings()
.ForMember(d => d.spd_dateofbirth, opt => opt.MapFrom(s => SharedMappingFuncs.GetDateFromDateOnly(s.DateOfBirth)))
.ForMember(d => d.spd_sex, opt => opt.MapFrom(s => SharedMappingFuncs.GetGender(s.GenderCode)))
.ForMember(d => d.spd_licenceterm, opt => opt.MapFrom(s => GetLicenceTerm(s.LicenceTermCode)))
.ForMember(d => d.spd_criminalchargesconvictionsorlawsuits, opt => opt.MapFrom(s => SharedMappingFuncs.GetYesNo(s.HasCriminalHistory)))
.ForMember(d => d.spd_criminalhistory, opt => opt.MapFrom(s => SharedMappingFuncs.GetYesNo(s.HasCriminalHistory)))
.ForMember(d => d.spd_bcdriverslicense, opt => opt.MapFrom(s => s.BcDriversLicenceNumber))
.ForMember(d => d.spd_applicanthaircolour, opt => opt.MapFrom(s => GetHairColor(s.HairColourCode)))
.ForMember(d => d.spd_applicanteyecolour, opt => opt.MapFrom(s => GetEyeColor(s.EyeColourCode)))
Expand Down Expand Up @@ -122,7 +122,7 @@ public Mappings()
.ForMember(d => d.GenderCode, opt => opt.MapFrom(s => SharedMappingFuncs.GetGenderEnum(s.spd_sex)))
.ForMember(d => d.BusinessTypeCode, opt => opt.MapFrom(s => SharedMappingFuncs.GetBusinessTypeEnum(s.spd_businesstype)))
.ForMember(d => d.LicenceTermCode, opt => opt.MapFrom(s => SharedMappingFuncs.GetLicenceTermEnum(s.spd_licenceterm)))
.ForMember(d => d.HasCriminalHistory, opt => opt.MapFrom(s => SharedMappingFuncs.GetBool(s.spd_criminalchargesconvictionsorlawsuits)))
.ForMember(d => d.HasCriminalHistory, opt => opt.MapFrom(s => SharedMappingFuncs.GetBool(s.spd_criminalhistory)))
.ForMember(d => d.HairColourCode, opt => opt.MapFrom(s => GetHairColorEnum(s.spd_applicanthaircolour)))
.ForMember(d => d.EyeColourCode, opt => opt.MapFrom(s => GetEyeColorEnum(s.spd_applicanteyecolour)))
.ForMember(d => d.MailingAddressData, opt => opt.Ignore())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"MakeTypesInternal": false,
"OpenGeneratedFilesInIDE": false,
"GenerateMultipleFiles": false,
"CustomHttpHeaders": "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ims0Y3BkRmdybU0yMHJhcThYVVRxMVlpaXNISSIsImtpZCI6Ims0Y3BkRmdybU0yMHJhcThYVVRxMVlpaXNISSJ9.eyJhdWQiOiJodHRwczovL3NwZC1zcGFyYy5kZXYuamFnLmdvdi5iYy5jYS9hcGkvZGF0YS92OS4wLyIsImlzcyI6Imh0dHA6Ly9zdHN0ZXN0Lmdvdi5iYy5jYS9hZGZzL3NlcnZpY2VzL3RydXN0IiwiaWF0IjoxNzA2OTIyNjk0LCJuYmYiOjE3MDY5MjI2OTQsImV4cCI6MTcwNjkyNjI5NCwidXBuIjoic3BkX29zYWRAZ292LmJjLmNhIiwidW5pcXVlX25hbWUiOiJJRElSXFxTUERfT1NBRCIsImFwcHR5cGUiOiJDb25maWRlbnRpYWwiLCJhcHBpZCI6IjAxNzRiMjAzLWNkY2YtNDE2NC04NTMyLTBhNGM0ZmRmZGY2MiIsImF1dGhtZXRob2QiOiJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YWM6Y2xhc3NlczpQYXNzd29yZFByb3RlY3RlZFRyYW5zcG9ydCIsImF1dGhfdGltZSI6IjIwMjQtMDItMDNUMDE6MTE6MzQuNjExWiIsInZlciI6IjEuMCIsInNjcCI6Im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jEuMCIsInNjcCI6Im9wZW5pZCJ9.oR-WL7qHSyya5vH7vyBjMFflCt0jIFY-nzThx0n0isldgaTtW09AGTqWhs-Xpzn_GbiyKkH9GXKHdfQ078Lp6g6KfwBNzPgkdmiYK3_PoxQNdD_yWw3eoxH7AooXXgc_tubfUYiWbvA2sfmFqdpn9VQ5phd-7u8QiLQ_Pd8alaPDr90VV363AdRBRi1u_qCsgqOnBDcYcNsD04_TRnlF0k9Vbit7_VqwFjLgsNHX6C9g9cAh9MNOOHqdLOcY3mNcu-L85U-EuVTCzf5yARKxoVX2QR9RM23p_cbkpTpe83DGXOoZwY4Ot1WkzcGHPkv5avYkQUX_HmOLC73Bx9lQJw",
"IncludeWebProxy": false,
"WebProxyHost": null,
"IncludeWebProxyNetworkCredentials": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28105,7 +28105,6 @@
<Property Name="spd_portalstatus" Type="Edm.Int32" />
<Property Name="spd_criminalchargesconvictionsdetails" Type="Edm.String" Unicode="false" />
<Property Name="spd_applicantbornincanada" Type="Edm.Int32" />
<Property Name="spd_employercity" Type="Edm.String" Unicode="false" />
<Property Name="spd_employercountry" Type="Edm.String" Unicode="false" />
<Property Name="spd_canadiancitizen" Type="Edm.Int32" />
<Property Name="modifiedon" Type="Edm.DateTimeOffset" />
Expand All @@ -28126,14 +28125,15 @@
<Property Name="spd_height" Type="Edm.String" Unicode="false" />
<Property Name="_spd_businesslicenseid_value" Type="Edm.Guid" />
<Property Name="spd_employeraddress2" Type="Edm.String" Unicode="false" />
<Property Name="spd_peaceofficer" Type="Edm.Int32" />
<Property Name="spd_permitpurpose" Type="Edm.String" Unicode="false" />
<Property Name="spd_name" Type="Edm.String" Unicode="false" />
<Property Name="spd_employeeid" Type="Edm.String" Unicode="false" />
<Property Name="spd_phonenumber" Type="Edm.String" Unicode="false" />
<Property Name="_owninguser_value" Type="Edm.Guid" />
<Property Name="_spd_organizationid_value" Type="Edm.Guid" />
<Property Name="spd_sex" Type="Edm.Int32" />
<Property Name="spd_applicationid" Type="Edm.Guid" />
<Property Name="spd_employercity" Type="Edm.String" Unicode="false" />
<Property Name="spd_applicanthaircolour" Type="Edm.Int32" />
<Property Name="_spd_applicantswlnumberid_value" Type="Edm.Guid" />
<Property Name="spd_usephotofrombcsc" Type="Edm.Int32" />
Expand All @@ -28148,6 +28148,7 @@
<Property Name="spd_fingerprintsonrecord" Type="Edm.Int32" />
<Property Name="spd_middlename1" Type="Edm.String" Unicode="false" />
<Property Name="spd_bcdriverslicense" Type="Edm.String" Unicode="false" />
<Property Name="spd_criminalhistory" Type="Edm.Int32" />
<Property Name="spd_licenceapplicationtype" Type="Edm.Int32" />
<Property Name="spd_employeraddress1" Type="Edm.String" Unicode="false" />
<Property Name="spd_employeremail" Type="Edm.String" Unicode="false" />
Expand Down Expand Up @@ -28184,6 +28185,7 @@
<Property Name="importsequencenumber" Type="Edm.Int32" />
<Property Name="spd_mentalhealthcondition" Type="Edm.Int32" />
<Property Name="spd_firstname" Type="Edm.String" Unicode="false" />
<Property Name="spd_peaceofficer" Type="Edm.Int32" />
<Property Name="spd_residentialpostalcode" Type="Edm.String" Unicode="false" />
<Property Name="spd_employerphonenumber" Type="Edm.String" Unicode="false" />
<Property Name="_ownerid_value" Type="Edm.Guid" />
Expand All @@ -28208,7 +28210,6 @@
<Property Name="spd_resideincanada" Type="Edm.Int32" />
<Property Name="spd_consent" Type="Edm.Boolean" />
<Property Name="_owningbusinessunit_value" Type="Edm.Guid" />
<Property Name="spd_permitpurpose" Type="Edm.Int32" />
<NavigationProperty Name="createdby" Type="mscrm.systemuser" Nullable="false" Partner="lk_spd_application_createdby">
<ReferentialConstraint Property="_createdby_value" ReferencedProperty="systemuserid" />
</NavigationProperty>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// </auto-generated>
//------------------------------------------------------------------------------

// Generation date: 2/2/2024 5:12:11 PM
// Generation date: 2/7/2024 3:01:57 PM
namespace Microsoft.Dynamics.CRM
{
/// <summary>
Expand Down Expand Up @@ -650087,28 +650087,6 @@ public virtual string spd_criminalchargesconvictionsdetails
partial void Onspd_applicantbornincanadaChanging(global::System.Nullable<int> value);
partial void Onspd_applicantbornincanadaChanged();
/// <summary>
/// There are no comments for Property spd_employercity in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]

public virtual string spd_employercity
{
get
{
return this._spd_employercity;
}
set
{
this.Onspd_employercityChanging(value);
this._spd_employercity = value;
this.Onspd_employercityChanged();
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
private string _spd_employercity;
partial void Onspd_employercityChanging(string value);
partial void Onspd_employercityChanged();
/// <summary>
/// There are no comments for Property spd_employercountry in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
Expand Down Expand Up @@ -650549,27 +650527,27 @@ public virtual string spd_employeraddress2
partial void Onspd_employeraddress2Changing(string value);
partial void Onspd_employeraddress2Changed();
/// <summary>
/// There are no comments for Property spd_peaceofficer in the schema.
/// There are no comments for Property spd_permitpurpose in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]

public virtual global::System.Nullable<int> spd_peaceofficer
public virtual string spd_permitpurpose
{
get
{
return this._spd_peaceofficer;
return this._spd_permitpurpose;
}
set
{
this.Onspd_peaceofficerChanging(value);
this._spd_peaceofficer = value;
this.Onspd_peaceofficerChanged();
this.Onspd_permitpurposeChanging(value);
this._spd_permitpurpose = value;
this.Onspd_permitpurposeChanged();
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
private global::System.Nullable<int> _spd_peaceofficer;
partial void Onspd_peaceofficerChanging(global::System.Nullable<int> value);
partial void Onspd_peaceofficerChanged();
private string _spd_permitpurpose;
partial void Onspd_permitpurposeChanging(string value);
partial void Onspd_permitpurposeChanged();
/// <summary>
/// There are no comments for Property spd_name in the schema.
/// </summary>
Expand Down Expand Up @@ -650725,6 +650703,28 @@ public virtual string spd_phonenumber
partial void Onspd_applicationidChanging(global::System.Nullable<global::System.Guid> value);
partial void Onspd_applicationidChanged();
/// <summary>
/// There are no comments for Property spd_employercity in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]

public virtual string spd_employercity
{
get
{
return this._spd_employercity;
}
set
{
this.Onspd_employercityChanging(value);
this._spd_employercity = value;
this.Onspd_employercityChanged();
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
private string _spd_employercity;
partial void Onspd_employercityChanging(string value);
partial void Onspd_employercityChanged();
/// <summary>
/// There are no comments for Property spd_applicanthaircolour in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
Expand Down Expand Up @@ -651033,6 +651033,28 @@ public virtual string spd_bcdriverslicense
partial void Onspd_bcdriverslicenseChanging(string value);
partial void Onspd_bcdriverslicenseChanged();
/// <summary>
/// There are no comments for Property spd_criminalhistory in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]

public virtual global::System.Nullable<int> spd_criminalhistory
{
get
{
return this._spd_criminalhistory;
}
set
{
this.Onspd_criminalhistoryChanging(value);
this._spd_criminalhistory = value;
this.Onspd_criminalhistoryChanged();
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
private global::System.Nullable<int> _spd_criminalhistory;
partial void Onspd_criminalhistoryChanging(global::System.Nullable<int> value);
partial void Onspd_criminalhistoryChanged();
/// <summary>
/// There are no comments for Property spd_licenceapplicationtype in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
Expand Down Expand Up @@ -651825,6 +651847,28 @@ public virtual string spd_firstname
partial void Onspd_firstnameChanging(string value);
partial void Onspd_firstnameChanged();
/// <summary>
/// There are no comments for Property spd_peaceofficer in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]

public virtual global::System.Nullable<int> spd_peaceofficer
{
get
{
return this._spd_peaceofficer;
}
set
{
this.Onspd_peaceofficerChanging(value);
this._spd_peaceofficer = value;
this.Onspd_peaceofficerChanged();
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
private global::System.Nullable<int> _spd_peaceofficer;
partial void Onspd_peaceofficerChanging(global::System.Nullable<int> value);
partial void Onspd_peaceofficerChanged();
/// <summary>
/// There are no comments for Property spd_residentialpostalcode in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
Expand Down Expand Up @@ -652353,28 +652397,6 @@ public virtual string spd_country
partial void On_owningbusinessunit_valueChanging(global::System.Nullable<global::System.Guid> value);
partial void On_owningbusinessunit_valueChanged();
/// <summary>
/// There are no comments for Property spd_permitpurpose in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]

public virtual global::System.Nullable<int> spd_permitpurpose
{
get
{
return this._spd_permitpurpose;
}
set
{
this.Onspd_permitpurposeChanging(value);
this._spd_permitpurpose = value;
this.Onspd_permitpurposeChanged();
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
private global::System.Nullable<int> _spd_permitpurpose;
partial void Onspd_permitpurposeChanging(global::System.Nullable<int> value);
partial void Onspd_permitpurposeChanged();
/// <summary>
/// There are no comments for Property createdby in the schema.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.OData.Client.Design.T4", "#VersionNumber#")]
Expand Down

0 comments on commit 8cf4ca0

Please sign in to comment.