This commit is contained in:
Zeeshaun
2026-04-20 14:47:24 -05:00
parent 89057eceea
commit 8b3ea92501
485 changed files with 71042 additions and 0 deletions
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LCU.API.Collections.RepoApi.Models
{
public class AppCorsConfig
{
public string[] CORS_AllowedOrigins { get; set; }
}
}
@@ -0,0 +1,10 @@
namespace LCU.API.Collections.RepoApi.Models
{
public class AppUser
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
public string[] Roles { get; set; }
}
}
@@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
namespace LCU.API.Collections.RepoApi.Models.Filters
{
public class AuctionAssignmentFilter : PageFilter
{
[FromQuery(Name = "readyForFloorPrice")]
public bool ReadyForFloorPrice { get; set; }
public AuctionAssignmentFilter() : base()
{
this.ReadyForFloorPrice = false;
}
public override object Clone()
{
var jsonString = JsonConvert.SerializeObject(this);
return JsonConvert.DeserializeObject(jsonString, this.GetType());
}
}
}
@@ -0,0 +1,27 @@
using System;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
namespace LCU.API.Collections.RepoApi.Models.Filters
{
public class PageFilter : ICloneable
{
[Range(1, 1000)]
public int Page { get; set; }
[Range(1, 1000)]
public int Limit { get; set; }
public PageFilter()
{
this.Page = 1;
this.Limit = 100;
}
public virtual object Clone()
{
var jsonString = JsonConvert.SerializeObject(this);
return JsonConvert.DeserializeObject(jsonString, this.GetType());
}
}
}
@@ -0,0 +1,10 @@
using LCU.Shared.Collections.RepoApiLib.Models.Reporting.Responses;
namespace LCU.API.Collections.RepoApi.Models.Reporting
{
public class ReportHeaderCellMap
{
public string Header { get; set; }
public ReportCell Cell { get; set; }
}
}
@@ -0,0 +1,29 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace LCU.API.Collections.RepoApi.Models.Requests
{
public class AccountQueueRequest : IValidatableObject
{
[Required]
[StringLength(16, MinimumLength = 7,
ErrorMessage = "The AccountNo field must have a length between 7 and 16 characters")]
public string AccountNo { get; set; }
[StringLength(20, MinimumLength = 1)] public string CaseId { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var results = new List<ValidationResult>();
if (string.IsNullOrWhiteSpace(AccountNo))
{
results.Add(new ValidationResult(
"AccountNo (AccountIdentifier) is not valid",
new[] { nameof(AccountNo) }));
}
return results;
}
}
}
@@ -0,0 +1,41 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using LCU.Shared.Collections.RepoApiLib.Models;
using LCU.Shared.Collections.RepoApiLib.WebServices.AutoIMS;
namespace LCU.API.Collections.RepoApi.Models.Requests
{
public class AuctionAssignmentPostRequest : IValidatableObject
{
[Required]
public Shared.Collections.RepoApiLib.Models.AuctionAssignment AuctionAssignment { get; set; }
[Required]
public IReadOnlyCollection<Collateral> Collaterals { get; set; }
[Required]
public VehicleLocation VehicleLocation { get; set; }
[Required]
public int? PrimaryCollateralId { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var failedValidations = new List<ValidationResult>();
if (this.Collaterals.Count == 0)
{
failedValidations.Add(new ValidationResult("There must be at least one collateral when creating an auction assignment."));
}
var primaryCollateral = Collaterals.Where(collateral => collateral.CollateralId == PrimaryCollateralId).FirstOrDefault();
if (primaryCollateral == null)
{
failedValidations.Add(new ValidationResult("Collaterals must contain a piece of Collateral with a CollateralID that matches the PrimaryCollateralId."));
}
return failedValidations;
}
}
}
@@ -0,0 +1,17 @@
using System.Collections.Generic;
namespace LCU.API.Collections.RepoApi.Models.Requests
{
public class RepoAccountPostFilter
{
public List<int?> RepoIdList { get; set; }
public string Status { get; set; }
public string AuctionHouseId { get; set; }
public int? RepoCompanyId { get; set; }
public bool? OnlyOpenAccounts { get; set; }
}
}
@@ -0,0 +1,16 @@
using System;
namespace LCU.API.Collections.RepoApi.Models.Requests
{
public class ReportingRequest
{
public DateTime LowDate { get; set; }
public DateTime HighDate { get; set; }
public ReportingRequest()
{
HighDate = DateTime.Today;
LowDate = HighDate.Subtract(TimeSpan.FromDays(365));
}
}
}
@@ -0,0 +1,9 @@
using LCU.Shared.Collections.RepoApiLib.Models;
namespace LCU.API.Collections.RepoApi.Models.Requests
{
public class VehicleFloorPricingParametersPutRequest
{
public VehicleFloorPricingParameters[] vehicleFloorPricingParameters;
}
}
@@ -0,0 +1,14 @@
using System.Collections.Generic;
using LCU.Shared.Collections.RepoApiLib.Models;
namespace LCU.API.Collections.RepoApi.Models.Responses
{
public class FactoidResponse
{
public string CumulativeValue { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string FontAwesomeIcon { get; set; }
public IReadOnlyCollection<RepoAccount> Records { get; set; }
}
}
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using LCU.API.Collections.RepoApi.Models.Filters;
using LCU.Shared.Collections.RepoApiLib.Models.Results;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Http;
namespace LCU.API.Collections.RepoApi.Models.Responses
{
public class PagedResponse<T> where T : class
{
public PagedResponse() { }
public PagedResponse(PagedResult<T> pagedResult, PageFilter filter, IUrlHelper url, HttpRequest request, string uriAction = "Get")
{
TotalItems = pagedResult.Total;
Items = pagedResult.Items;
CurrentPage = filter.Page;
TotalPages = pagedResult.Total == 0 ? 1 : (int) Math.Ceiling((decimal) pagedResult.Total / filter.Limit);
PageFilter newFilter = filter.Clone() as PageFilter;
if (pagedResult.Total > (filter.Page * filter.Limit))
{
newFilter.Page = filter.Page + 1;
NextPage = new Uri(url.Action(uriAction, null, newFilter, request.Scheme));
}
if (filter.Page > 1)
{
newFilter.Page = filter.Page - 1;
PreviousPage = new Uri(url.Action(uriAction, null, newFilter, request.Scheme));
}
}
public IEnumerable<T> Items { get; set; }
public Uri NextPage { get; set; }
public Uri PreviousPage { get; set; }
public int TotalItems { get; set; }
public int CurrentPage { get; set; }
public int TotalPages { get; set; }
}
}
@@ -0,0 +1,10 @@
using LCU.Shared.Collections.RepoApiLib.Models;
namespace LCU.API.Collections.RepoApi.Models.Responses
{
public class RepoCompanySelectionPostResponse
{
public RepoCompanySelection PreviousRepoCompanySelection {get; set;}
public RepoCompanySelection NewRepoCompanySelection { get; set; }
}
}
@@ -0,0 +1,9 @@
using LCU.Shared.Collections.RepoApiLib.Models;
namespace LCU.API.Collections.RepoApi.Models.Responses
{
public class VehicleFloorPricingParametersPutResponse
{
public VehicleFloorPricingParameters[] vehicleFloorPricingParameters;
}
}
@@ -0,0 +1,11 @@
using System;
namespace LCU.API.Collections.RepoApi.Models.Results
{
public class DateTimeResult : IResult<DateTime?>
{
public DateTime? Value { get; set; } = null;
public string ErrorMessage { get; set; } = null;
public bool IsSuccess { get; set; } = false;
}
}
@@ -0,0 +1,11 @@
using System;
namespace LCU.API.Collections.RepoApi.Models.Results
{
public interface IResult<T>
{
T Value { get; set; }
bool IsSuccess { get; set; }
String ErrorMessage { get; set; }
}
}
@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace LCU.API.Collections.RepoApi.Models
{
public class SqlOptionsConfig
{
public int MaxRetryCount { get; set; }
public TimeSpan MaxRetryDelay { get; set; }
public List<int> ErrorNumbersToAdd { get; set; }
public bool EnableDetailedErrors { get; set; }
}
}