37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
using Landmark.OLA.Models.Decisioning.Enums;
|
|
|
|
namespace Landmark.OLA.Models.Decisioning
|
|
{
|
|
|
|
//TODO: At some point the LoanApplication class should probably have this class as a property. Might need to wait for parsing.
|
|
public class DecisioningDetails
|
|
{
|
|
public DecisioningState DecisioningState { get; set; }
|
|
public DecisioningResult? DecisioningResult { get; set; }
|
|
|
|
public ICollection<int> Stipulations { get; private set; }
|
|
|
|
public DecisioningDetails(ICollection<int> stipulations = null)
|
|
{
|
|
Stipulations = stipulations ?? new List<int>();
|
|
}
|
|
|
|
public override bool Equals(object obj)
|
|
{
|
|
if (obj.GetType() != this.GetType())
|
|
return false;
|
|
|
|
var compare = (DecisioningDetails)obj;
|
|
|
|
return DecisioningState.Equals(compare.DecisioningState)
|
|
&& DecisioningResult.Equals(compare.DecisioningResult)
|
|
&& Stipulations.SequenceEqual(compare.Stipulations);
|
|
}
|
|
|
|
public override int GetHashCode()
|
|
{
|
|
return HashCode.Combine(DecisioningState, DecisioningResult, Stipulations);
|
|
}
|
|
}
|
|
}
|