Adding
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using LCU.Library.Internal.LoanRateModels.Enums;
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities.LoadTestingEntities;
|
||||
|
||||
public class LoadTestRunInfo
|
||||
{
|
||||
public int LoadTestRunInfoId { get; set; }
|
||||
public DateTime StartTimeStamp { get; set; }
|
||||
public DateTime? EndTimeStamp { get; set; } = null;
|
||||
public RateTypes RateType { get; set; }
|
||||
public int RateProcessingInfosCount { get; set; }
|
||||
public int RateProcessingInfosCompleteCount { get; set; } = 0;
|
||||
|
||||
[ForeignKey("LoadTestRunInfoId")]
|
||||
public ICollection<RateProcessingInfo> RateProcessingInfos { get; set; }
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using LCU.Library.Internal.LCUFilterModels.Pagination;
|
||||
using LCU.Library.Internal.LoanRateModels.Enums;
|
||||
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities.LoadTestingEntities;
|
||||
public class LoadTestRunInfoFilter : Filter
|
||||
{
|
||||
public LoadTestRunInfoFilter()
|
||||
{
|
||||
SortableFields =
|
||||
new() {
|
||||
new SortableField
|
||||
{
|
||||
Field = nameof(LoadTestRunInfo.RateType),
|
||||
DisplayValue = "Rate Type",
|
||||
Active = false
|
||||
},
|
||||
new SortableField
|
||||
{
|
||||
Field = nameof(LoadTestRunInfo.StartTimeStamp),
|
||||
DisplayValue = "Start Time",
|
||||
IsDescending = true,
|
||||
Active = true
|
||||
},
|
||||
new SortableField
|
||||
{
|
||||
Field = nameof(LoadTestRunInfo.EndTimeStamp),
|
||||
DisplayValue = "End Time",
|
||||
Active = false
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
public bool InProgress { get; set; }
|
||||
public List<RateTypes> RateTypes { get; set; } = new();
|
||||
public DateTime? StartTimeStamp { get; set; }
|
||||
public DateTime? EndTimeStamp { get; set; }
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
using LCU.Library.Internal.LoanRateModels.Enums.LoadTestingEnums;
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities.LoadTestingEntities;
|
||||
|
||||
public class RateProcessingInfo
|
||||
{
|
||||
public int RateProcessingInfoId { get; set; }
|
||||
public int LoadTestRunInfoId { get; set; }
|
||||
public string Payload { get; set; }
|
||||
public decimal Rate { get; set; }
|
||||
public string Column { get; set; }
|
||||
public string Row { get; set; }
|
||||
public RateProcessingStatusTypes RateProcessingStatusType { get; set; }
|
||||
public RateProcessingResultTypes RateProcessingResultType { get; set; }
|
||||
public string ProcessingMessage { get; set; }
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
using LCU.Library.Internal.LCUFilterModels.Pagination;
|
||||
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities.LoadTestingEntities;
|
||||
public class RateProcessingInfoFilter : Filter
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities;
|
||||
|
||||
public class Rate
|
||||
{
|
||||
public int RateId { get; set; }
|
||||
public int? RateUploadInfoId { get; set; }
|
||||
public int? ClosingRateUploadInfoId { get; set; }
|
||||
public string Column { get; set; }
|
||||
public string Row { get; set; }
|
||||
public int RateSheetId { get; set; }
|
||||
public decimal Value { get; set; }
|
||||
[Required]
|
||||
[Range(typeof(DateTime), "1/2/0001", "12/30/9999", ErrorMessage = "Value for {0} must be between {1} and {2}")]
|
||||
public DateTime RateStartDate { get; set; }
|
||||
public DateTime? RateEndDate { get; set; }
|
||||
|
||||
[ForeignKey("RateId")]
|
||||
public ICollection<RateEvaluation> RateEvaluations { get; set; }
|
||||
|
||||
public Rate DeepCopyNewRate()
|
||||
{
|
||||
Rate newRate = (Rate)this.MemberwiseClone();
|
||||
newRate.RateId = 0;
|
||||
newRate.RateEvaluations = new List<RateEvaluation>();
|
||||
foreach (var rateRule in RateEvaluations)
|
||||
{
|
||||
var newRateRule = (RateEvaluation)rateRule.ShallowCopyNewRate();
|
||||
newRate.RateEvaluations.Add(newRateRule);
|
||||
}
|
||||
|
||||
return newRate;
|
||||
}
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using LCU.Library.Internal.LcuEvaluationModels.Entities;
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities;
|
||||
|
||||
public class RateEvaluation
|
||||
{
|
||||
public int RateEvaluationId { get; set; }
|
||||
public int RateId { get; set; }
|
||||
public int EvaluationDetailId { get; set; }
|
||||
|
||||
[ForeignKey("EvaluationDetailId")]
|
||||
public EvaluationDetail EvaluationDetail { get; set; }
|
||||
|
||||
public RateEvaluation ShallowCopyNewRate()
|
||||
{
|
||||
var newRateRule = (RateEvaluation)MemberwiseClone();
|
||||
newRateRule.RateEvaluationId = 0;
|
||||
newRateRule.RateId = 0;
|
||||
return newRateRule;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using LCU.Library.Internal.LoanRateModels.Enums;
|
||||
using LCU.Library.Internal.TypeExtensions.EnumExtensions;
|
||||
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities;
|
||||
|
||||
public class RateSheet
|
||||
{
|
||||
[Key]
|
||||
public int RateSheetId { get; set; }
|
||||
[Required]
|
||||
public RateTypes RateType { get; set; }
|
||||
[Required]
|
||||
public string CreatedBy { get; set; } = "System";
|
||||
public DateTime TimeCreated { get; set; } = DateTime.Now;
|
||||
|
||||
public string SheetName => RateType.GetNameFromValue();
|
||||
|
||||
[ForeignKey("RateSheetId")]
|
||||
public ICollection<Rate> Rates { get; set; }
|
||||
|
||||
[ForeignKey("RateSheetId")]
|
||||
public ICollection<RateSheetCell> RateSheetCells { get; set; }
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using LCU.Library.Internal.LoanRateModels.Enums;
|
||||
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities;
|
||||
|
||||
public class RateSheetCell
|
||||
{
|
||||
[Key]
|
||||
public int RateSheetCellId { get; set; }
|
||||
[Required]
|
||||
public int RateSheetId { get; set; }
|
||||
[Required]
|
||||
public string Column { get; set; }
|
||||
public int ColumnSpan { get; set; } = 1;
|
||||
[Required]
|
||||
public string Row { get; set; }
|
||||
public int RowSpan { get; set; } = 1;
|
||||
public string Value { get; set; }
|
||||
public RateSheetCellTypes RateSheetCellType { get; set; }
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities;
|
||||
|
||||
public class RateUploadInfo
|
||||
{
|
||||
[Key]
|
||||
public int RateUploadInfoId { get; set; }
|
||||
public int Version { get; set; }
|
||||
public string Filename { get; set; }
|
||||
public DateTime EffectiveDate { get; set; }
|
||||
public DateTime TimeCreated { get; set; }
|
||||
public string CreatedBy { get; set; }
|
||||
public int RateCount { get; set; }
|
||||
|
||||
[ForeignKey("RateUploadInfoId")]
|
||||
public ICollection<Rate> Rates { get; set; }
|
||||
|
||||
[ForeignKey("ClosingRateUploadInfoId")]
|
||||
public ICollection<Rate>? ClosedRates { get; set; }
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using LCU.Library.Internal.LCUFilterModels.Pagination;
|
||||
|
||||
namespace LCU.Library.Internal.LoanRateModels.Entities;
|
||||
public class RateUploadInfoFilter : Filter
|
||||
{
|
||||
public RateUploadInfoFilter()
|
||||
{
|
||||
SortableFields =
|
||||
new() {
|
||||
new SortableField
|
||||
{
|
||||
Position = 0,
|
||||
Field = nameof(RateUploadInfo.EffectiveDate),
|
||||
DisplayValue = "Effective Date",
|
||||
IsDescending = true,
|
||||
Active = true
|
||||
},
|
||||
new SortableField
|
||||
{
|
||||
Position = 1,
|
||||
Field = nameof(RateUploadInfo.Version),
|
||||
DisplayValue = "Version",
|
||||
IsDescending = true,
|
||||
Active = true
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public int? Version { get; set; }
|
||||
public DateTime? EffectiveDate { get; set; }
|
||||
public string? CreatedBy { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user