Adding
This commit is contained in:
@@ -0,0 +1,363 @@
|
|||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
##
|
||||||
|
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.rsuser
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.userosscache
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||||
|
*.userprefs
|
||||||
|
|
||||||
|
# Mono auto generated files
|
||||||
|
mono_crash.*
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Dd]ebugPublic/
|
||||||
|
[Rr]elease/
|
||||||
|
[Rr]eleases/
|
||||||
|
x64/
|
||||||
|
x86/
|
||||||
|
[Ww][Ii][Nn]32/
|
||||||
|
[Aa][Rr][Mm]/
|
||||||
|
[Aa][Rr][Mm]64/
|
||||||
|
bld/
|
||||||
|
[Bb]in/
|
||||||
|
[Oo]bj/
|
||||||
|
[Ll]og/
|
||||||
|
[Ll]ogs/
|
||||||
|
|
||||||
|
# Visual Studio 2015/2017 cache/options directory
|
||||||
|
.vs/
|
||||||
|
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||||
|
#wwwroot/
|
||||||
|
|
||||||
|
# Visual Studio 2017 auto generated files
|
||||||
|
Generated\ Files/
|
||||||
|
|
||||||
|
# MSTest test Results
|
||||||
|
[Tt]est[Rr]esult*/
|
||||||
|
[Bb]uild[Ll]og.*
|
||||||
|
|
||||||
|
# NUnit
|
||||||
|
*.VisualState.xml
|
||||||
|
TestResult.xml
|
||||||
|
nunit-*.xml
|
||||||
|
|
||||||
|
# Build Results of an ATL Project
|
||||||
|
[Dd]ebugPS/
|
||||||
|
[Rr]eleasePS/
|
||||||
|
dlldata.c
|
||||||
|
|
||||||
|
# Benchmark Results
|
||||||
|
BenchmarkDotNet.Artifacts/
|
||||||
|
|
||||||
|
# .NET Core
|
||||||
|
project.lock.json
|
||||||
|
project.fragment.lock.json
|
||||||
|
artifacts/
|
||||||
|
|
||||||
|
# ASP.NET Scaffolding
|
||||||
|
ScaffoldingReadMe.txt
|
||||||
|
|
||||||
|
# StyleCop
|
||||||
|
StyleCopReport.xml
|
||||||
|
|
||||||
|
# Files built by Visual Studio
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*_h.h
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.iobj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.ipdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.tmp_proj
|
||||||
|
*_wpftmp.csproj
|
||||||
|
*.log
|
||||||
|
*.vspscc
|
||||||
|
*.vssscc
|
||||||
|
.builds
|
||||||
|
*.pidb
|
||||||
|
*.svclog
|
||||||
|
*.scc
|
||||||
|
|
||||||
|
# Chutzpah Test files
|
||||||
|
_Chutzpah*
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opendb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
*.cachefile
|
||||||
|
*.VC.db
|
||||||
|
*.VC.VC.opendb
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
*.vspx
|
||||||
|
*.sap
|
||||||
|
|
||||||
|
# Visual Studio Trace Files
|
||||||
|
*.e2e
|
||||||
|
|
||||||
|
# TFS 2012 Local Workspace
|
||||||
|
$tf/
|
||||||
|
|
||||||
|
# Guidance Automation Toolkit
|
||||||
|
*.gpState
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*/
|
||||||
|
*.[Rr]e[Ss]harper
|
||||||
|
*.DotSettings.user
|
||||||
|
|
||||||
|
# TeamCity is a build add-in
|
||||||
|
_TeamCity*
|
||||||
|
|
||||||
|
# DotCover is a Code Coverage Tool
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
# AxoCover is a Code Coverage Tool
|
||||||
|
.axoCover/*
|
||||||
|
!.axoCover/settings.json
|
||||||
|
|
||||||
|
# Coverlet is a free, cross platform Code Coverage Tool
|
||||||
|
coverage*.json
|
||||||
|
coverage*.xml
|
||||||
|
coverage*.info
|
||||||
|
|
||||||
|
# Visual Studio code coverage results
|
||||||
|
*.coverage
|
||||||
|
*.coveragexml
|
||||||
|
|
||||||
|
# NCrunch
|
||||||
|
_NCrunch_*
|
||||||
|
.*crunch*.local.xml
|
||||||
|
nCrunchTemp_*
|
||||||
|
|
||||||
|
# MightyMoose
|
||||||
|
*.mm.*
|
||||||
|
AutoTest.Net/
|
||||||
|
|
||||||
|
# Web workbench (sass)
|
||||||
|
.sass-cache/
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress/
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish/
|
||||||
|
|
||||||
|
# Publish Web Output
|
||||||
|
*.[Pp]ublish.xml
|
||||||
|
*.azurePubxml
|
||||||
|
# Note: Comment the next line if you want to checkin your web deploy settings,
|
||||||
|
# but database connection strings (with potential passwords) will be unencrypted
|
||||||
|
*.pubxml
|
||||||
|
*.publishproj
|
||||||
|
|
||||||
|
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||||
|
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||||
|
# in these scripts will be unencrypted
|
||||||
|
PublishScripts/
|
||||||
|
|
||||||
|
# NuGet Packages
|
||||||
|
*.nupkg
|
||||||
|
# NuGet Symbol Packages
|
||||||
|
*.snupkg
|
||||||
|
# The packages folder can be ignored because of Package Restore
|
||||||
|
**/[Pp]ackages/*
|
||||||
|
# except build/, which is used as an MSBuild target.
|
||||||
|
!**/[Pp]ackages/build/
|
||||||
|
# Uncomment if necessary however generally it will be regenerated when needed
|
||||||
|
#!**/[Pp]ackages/repositories.config
|
||||||
|
# NuGet v3's project.json files produces more ignorable files
|
||||||
|
*.nuget.props
|
||||||
|
*.nuget.targets
|
||||||
|
|
||||||
|
# Microsoft Azure Build Output
|
||||||
|
csx/
|
||||||
|
*.build.csdef
|
||||||
|
|
||||||
|
# Microsoft Azure Emulator
|
||||||
|
ecf/
|
||||||
|
rcf/
|
||||||
|
|
||||||
|
# Windows Store app package directories and files
|
||||||
|
AppPackages/
|
||||||
|
BundleArtifacts/
|
||||||
|
Package.StoreAssociation.xml
|
||||||
|
_pkginfo.txt
|
||||||
|
*.appx
|
||||||
|
*.appxbundle
|
||||||
|
*.appxupload
|
||||||
|
|
||||||
|
# Visual Studio cache files
|
||||||
|
# files ending in .cache can be ignored
|
||||||
|
*.[Cc]ache
|
||||||
|
# but keep track of directories ending in .cache
|
||||||
|
!?*.[Cc]ache/
|
||||||
|
|
||||||
|
# Others
|
||||||
|
ClientBin/
|
||||||
|
~$*
|
||||||
|
*~
|
||||||
|
*.dbmdl
|
||||||
|
*.dbproj.schemaview
|
||||||
|
*.jfm
|
||||||
|
*.pfx
|
||||||
|
*.publishsettings
|
||||||
|
orleans.codegen.cs
|
||||||
|
|
||||||
|
# Including strong name files can present a security risk
|
||||||
|
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
|
||||||
|
#*.snk
|
||||||
|
|
||||||
|
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||||
|
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||||
|
#bower_components/
|
||||||
|
|
||||||
|
# RIA/Silverlight projects
|
||||||
|
Generated_Code/
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file
|
||||||
|
# to a newer Visual Studio version. Backup files are not needed,
|
||||||
|
# because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
UpgradeLog*.htm
|
||||||
|
ServiceFabricBackup/
|
||||||
|
*.rptproj.bak
|
||||||
|
|
||||||
|
# SQL Server files
|
||||||
|
*.mdf
|
||||||
|
*.ldf
|
||||||
|
*.ndf
|
||||||
|
|
||||||
|
# Business Intelligence projects
|
||||||
|
*.rdl.data
|
||||||
|
*.bim.layout
|
||||||
|
*.bim_*.settings
|
||||||
|
*.rptproj.rsuser
|
||||||
|
*- [Bb]ackup.rdl
|
||||||
|
*- [Bb]ackup ([0-9]).rdl
|
||||||
|
*- [Bb]ackup ([0-9][0-9]).rdl
|
||||||
|
|
||||||
|
# Microsoft Fakes
|
||||||
|
FakesAssemblies/
|
||||||
|
|
||||||
|
# GhostDoc plugin setting file
|
||||||
|
*.GhostDoc.xml
|
||||||
|
|
||||||
|
# Node.js Tools for Visual Studio
|
||||||
|
.ntvs_analysis.dat
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# Visual Studio 6 build log
|
||||||
|
*.plg
|
||||||
|
|
||||||
|
# Visual Studio 6 workspace options file
|
||||||
|
*.opt
|
||||||
|
|
||||||
|
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
|
||||||
|
*.vbw
|
||||||
|
|
||||||
|
# Visual Studio LightSwitch build output
|
||||||
|
**/*.HTMLClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/GeneratedArtifacts
|
||||||
|
**/*.DesktopClient/ModelManifest.xml
|
||||||
|
**/*.Server/GeneratedArtifacts
|
||||||
|
**/*.Server/ModelManifest.xml
|
||||||
|
_Pvt_Extensions
|
||||||
|
|
||||||
|
# Paket dependency manager
|
||||||
|
.paket/paket.exe
|
||||||
|
paket-files/
|
||||||
|
|
||||||
|
# FAKE - F# Make
|
||||||
|
.fake/
|
||||||
|
|
||||||
|
# CodeRush personal settings
|
||||||
|
.cr/personal
|
||||||
|
|
||||||
|
# Python Tools for Visual Studio (PTVS)
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
|
||||||
|
# Cake - Uncomment if you are using it
|
||||||
|
# tools/**
|
||||||
|
# !tools/packages.config
|
||||||
|
|
||||||
|
# Tabs Studio
|
||||||
|
*.tss
|
||||||
|
|
||||||
|
# Telerik's JustMock configuration file
|
||||||
|
*.jmconfig
|
||||||
|
|
||||||
|
# BizTalk build output
|
||||||
|
*.btp.cs
|
||||||
|
*.btm.cs
|
||||||
|
*.odx.cs
|
||||||
|
*.xsd.cs
|
||||||
|
|
||||||
|
# OpenCover UI analysis results
|
||||||
|
OpenCover/
|
||||||
|
|
||||||
|
# Azure Stream Analytics local run output
|
||||||
|
ASALocalRun/
|
||||||
|
|
||||||
|
# MSBuild Binary and Structured Log
|
||||||
|
*.binlog
|
||||||
|
|
||||||
|
# NVidia Nsight GPU debugger configuration file
|
||||||
|
*.nvuser
|
||||||
|
|
||||||
|
# MFractors (Xamarin productivity tool) working folder
|
||||||
|
.mfractor/
|
||||||
|
|
||||||
|
# Local History for Visual Studio
|
||||||
|
.localhistory/
|
||||||
|
|
||||||
|
# BeatPulse healthcheck temp database
|
||||||
|
healthchecksdb
|
||||||
|
|
||||||
|
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||||
|
MigrationBackup/
|
||||||
|
|
||||||
|
# Ionide (cross platform F# VS Code tools) working folder
|
||||||
|
.ionide/
|
||||||
|
|
||||||
|
# Fody - auto-generated XML schema
|
||||||
|
FodyWeavers.xsd
|
||||||
|
.idea/**
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
# .NET Core SDK
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS aspnetcore-build
|
||||||
|
|
||||||
|
# Copy Projects
|
||||||
|
COPY LCU.API.Internal.RepoApi/LCU.API.Internal.RepoApi.csproj ./source/LCU.API.Internal.RepoApi/
|
||||||
|
COPY LCU.API.Internal.RepoApi.Repos/LCU.API.Internal.RepoApi.Repos.csproj ./source/LCU.API.Internal.RepoApi.Repos/
|
||||||
|
COPY LCU.Library.Internal.RepoApiModels/LCU.Library.Internal.RepoApiModels.csproj ./source/LCU.Library.Internal.RepoApiModels/
|
||||||
|
|
||||||
|
# Install Credential Provider and set env variables to enable Nuget restore with auth
|
||||||
|
ARG PAT=bh2lq3jibktw67b2wdbqyfln7cd3je6lk52kijntpj43v6kimpgq
|
||||||
|
RUN curl -L https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | sh
|
||||||
|
#RUN wget -qO- https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh | bash
|
||||||
|
ENV NUGET_CREDENTIALPROVIDER_SESSIONTOKENCACHE_ENABLED true
|
||||||
|
ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS "{\"endpointCredentials\": [{\"endpoint\":\"https://landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/nuget/v3/index.json\", \"password\":\"${PAT}\"}]}"
|
||||||
|
|
||||||
|
# .NET Core Restore, use auth'd feed
|
||||||
|
RUN dotnet restore -s "https://landmarkcu.pkgs.visualstudio.com/_packaging/LCU-Internal/nuget/v3/index.json" -s "https://api.nuget.org/v3/index.json" ./source/LCU.API.Internal.RepoApi/LCU.API.Internal.RepoApi.csproj
|
||||||
|
|
||||||
|
# Copy All Files
|
||||||
|
COPY . ./source/
|
||||||
|
|
||||||
|
FROM aspnetcore-build AS test
|
||||||
|
LABEL test=true
|
||||||
|
COPY LCU.API.Internal.RepoApiTests/LCU.API.Internal.RepoApiTests.csproj ./source/LCU.API.Internal.RepoApiTests/
|
||||||
|
RUN dotnet restore ./source/LCU.API.Internal.RepoApiTests/LCU.API.Internal.RepoApiTests.csproj
|
||||||
|
RUN dotnet test -c Release --results-directory /testresults --logger "trx;LogFileName=test_results.trx" ./source/LCU.API.Internal.RepoApiTests/LCU.API.Internal.RepoApiTests.csproj
|
||||||
|
|
||||||
|
# .NET Core Publish
|
||||||
|
FROM aspnetcore-build as publish
|
||||||
|
RUN dotnet publish ./source/LCU.API.Internal.RepoApi/LCU.API.Internal.RepoApi.csproj -c Release -o /dist
|
||||||
|
|
||||||
|
# ASP.NET Core
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine3.20
|
||||||
|
RUN apk add --no-cache icu-libs && apk add --no-cache tzdata;
|
||||||
|
ENV TZ America/Chicago
|
||||||
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
|
ENV ASPNETCORE_ENVIRONMENT=Development
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=publish /dist .
|
||||||
|
ENTRYPOINT ["dotnet", "LCU.API.Internal.RepoApi.dll"]
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"ExtendedData": {
|
||||||
|
"inputs": [
|
||||||
|
"https://webservice-stage.jdpowervalues.com/vehicles/secure/securelogin.asmx?wsdl"
|
||||||
|
],
|
||||||
|
"collectionTypes": [
|
||||||
|
"System.Array",
|
||||||
|
"System.Collections.Generic.Dictionary`2"
|
||||||
|
],
|
||||||
|
"namespaceMappings": [
|
||||||
|
"*, JdpLogin"
|
||||||
|
],
|
||||||
|
"targetFramework": "netcoreapp2.2",
|
||||||
|
"typeReuseMode": "All"
|
||||||
|
}
|
||||||
|
}
|
||||||
+258
@@ -0,0 +1,258 @@
|
|||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// <auto-generated>
|
||||||
|
// This code was generated by a tool.
|
||||||
|
//
|
||||||
|
// Changes to this file may cause incorrect behavior and will be lost if
|
||||||
|
// the code is regenerated.
|
||||||
|
// </auto-generated>
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
namespace JdpLogin
|
||||||
|
{
|
||||||
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
[System.Runtime.Serialization.DataContractAttribute(Name="GetTokenRequest", Namespace="http://webservice.jdpowervalues.com/")]
|
||||||
|
public partial class GetTokenRequest : object
|
||||||
|
{
|
||||||
|
|
||||||
|
private string UsernameField;
|
||||||
|
|
||||||
|
private string PasswordField;
|
||||||
|
|
||||||
|
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false)]
|
||||||
|
public string Username
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.UsernameField;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.UsernameField = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=1)]
|
||||||
|
public string Password
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this.PasswordField;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
this.PasswordField = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
[System.ServiceModel.ServiceContractAttribute(Namespace="http://webservice.jdpowervalues.com/", ConfigurationName="JdpLogin.SecureLoginSoap")]
|
||||||
|
public interface SecureLoginSoap
|
||||||
|
{
|
||||||
|
|
||||||
|
[System.ServiceModel.OperationContractAttribute(Action="http://webservice.jdpowervalues.com/getToken", ReplyAction="*")]
|
||||||
|
System.Threading.Tasks.Task<JdpLogin.getTokenResponse> getTokenAsync(JdpLogin.getTokenRequest1 request);
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
|
||||||
|
public partial class getTokenRequest1
|
||||||
|
{
|
||||||
|
|
||||||
|
[System.ServiceModel.MessageBodyMemberAttribute(Name="getToken", Namespace="http://webservice.jdpowervalues.com/", Order=0)]
|
||||||
|
public JdpLogin.getTokenRequest1Body Body;
|
||||||
|
|
||||||
|
public getTokenRequest1()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public getTokenRequest1(JdpLogin.getTokenRequest1Body Body)
|
||||||
|
{
|
||||||
|
this.Body = Body;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://webservice.jdpowervalues.com/")]
|
||||||
|
public partial class getTokenRequest1Body
|
||||||
|
{
|
||||||
|
|
||||||
|
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
|
||||||
|
public JdpLogin.GetTokenRequest tokenRequest;
|
||||||
|
|
||||||
|
public getTokenRequest1Body()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public getTokenRequest1Body(JdpLogin.GetTokenRequest tokenRequest)
|
||||||
|
{
|
||||||
|
this.tokenRequest = tokenRequest;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
[System.ServiceModel.MessageContractAttribute(IsWrapped=false)]
|
||||||
|
public partial class getTokenResponse
|
||||||
|
{
|
||||||
|
|
||||||
|
[System.ServiceModel.MessageBodyMemberAttribute(Name="getTokenResponse", Namespace="http://webservice.jdpowervalues.com/", Order=0)]
|
||||||
|
public JdpLogin.getTokenResponseBody Body;
|
||||||
|
|
||||||
|
public getTokenResponse()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public getTokenResponse(JdpLogin.getTokenResponseBody Body)
|
||||||
|
{
|
||||||
|
this.Body = Body;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
[System.Runtime.Serialization.DataContractAttribute(Namespace="http://webservice.jdpowervalues.com/")]
|
||||||
|
public partial class getTokenResponseBody
|
||||||
|
{
|
||||||
|
|
||||||
|
[System.Runtime.Serialization.DataMemberAttribute(EmitDefaultValue=false, Order=0)]
|
||||||
|
public string getTokenResult;
|
||||||
|
|
||||||
|
public getTokenResponseBody()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public getTokenResponseBody(string getTokenResult)
|
||||||
|
{
|
||||||
|
this.getTokenResult = getTokenResult;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
public interface SecureLoginSoapChannel : JdpLogin.SecureLoginSoap, System.ServiceModel.IClientChannel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Diagnostics.DebuggerStepThroughAttribute()]
|
||||||
|
[System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "2.0.3")]
|
||||||
|
public partial class SecureLoginSoapClient : System.ServiceModel.ClientBase<JdpLogin.SecureLoginSoap>, JdpLogin.SecureLoginSoap
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Implement this partial method to configure the service endpoint.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="serviceEndpoint">The endpoint to configure</param>
|
||||||
|
/// <param name="clientCredentials">The client credentials</param>
|
||||||
|
static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials);
|
||||||
|
|
||||||
|
public SecureLoginSoapClient(EndpointConfiguration endpointConfiguration) :
|
||||||
|
base(SecureLoginSoapClient.GetBindingForEndpoint(endpointConfiguration), SecureLoginSoapClient.GetEndpointAddress(endpointConfiguration))
|
||||||
|
{
|
||||||
|
this.Endpoint.Name = endpointConfiguration.ToString();
|
||||||
|
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SecureLoginSoapClient(EndpointConfiguration endpointConfiguration, string remoteAddress) :
|
||||||
|
base(SecureLoginSoapClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress))
|
||||||
|
{
|
||||||
|
this.Endpoint.Name = endpointConfiguration.ToString();
|
||||||
|
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SecureLoginSoapClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) :
|
||||||
|
base(SecureLoginSoapClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress)
|
||||||
|
{
|
||||||
|
this.Endpoint.Name = endpointConfiguration.ToString();
|
||||||
|
ConfigureEndpoint(this.Endpoint, this.ClientCredentials);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SecureLoginSoapClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
|
||||||
|
base(binding, remoteAddress)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||||
|
System.Threading.Tasks.Task<JdpLogin.getTokenResponse> JdpLogin.SecureLoginSoap.getTokenAsync(JdpLogin.getTokenRequest1 request)
|
||||||
|
{
|
||||||
|
return base.Channel.getTokenAsync(request);
|
||||||
|
}
|
||||||
|
|
||||||
|
public System.Threading.Tasks.Task<JdpLogin.getTokenResponse> getTokenAsync(JdpLogin.GetTokenRequest tokenRequest)
|
||||||
|
{
|
||||||
|
JdpLogin.getTokenRequest1 inValue = new JdpLogin.getTokenRequest1();
|
||||||
|
inValue.Body = new JdpLogin.getTokenRequest1Body();
|
||||||
|
inValue.Body.tokenRequest = tokenRequest;
|
||||||
|
return ((JdpLogin.SecureLoginSoap)(this)).getTokenAsync(inValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual System.Threading.Tasks.Task OpenAsync()
|
||||||
|
{
|
||||||
|
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndOpen));
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual System.Threading.Tasks.Task CloseAsync()
|
||||||
|
{
|
||||||
|
return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action<System.IAsyncResult>(((System.ServiceModel.ICommunicationObject)(this)).EndClose));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration)
|
||||||
|
{
|
||||||
|
if ((endpointConfiguration == EndpointConfiguration.SecureLoginSoap))
|
||||||
|
{
|
||||||
|
System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding();
|
||||||
|
result.MaxBufferSize = int.MaxValue;
|
||||||
|
result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max;
|
||||||
|
result.MaxReceivedMessageSize = int.MaxValue;
|
||||||
|
result.AllowCookies = true;
|
||||||
|
result.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.Transport;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
if ((endpointConfiguration == EndpointConfiguration.SecureLoginSoap12))
|
||||||
|
{
|
||||||
|
System.ServiceModel.Channels.CustomBinding result = new System.ServiceModel.Channels.CustomBinding();
|
||||||
|
System.ServiceModel.Channels.TextMessageEncodingBindingElement textBindingElement = new System.ServiceModel.Channels.TextMessageEncodingBindingElement();
|
||||||
|
textBindingElement.MessageVersion = System.ServiceModel.Channels.MessageVersion.CreateVersion(System.ServiceModel.EnvelopeVersion.Soap12, System.ServiceModel.Channels.AddressingVersion.None);
|
||||||
|
result.Elements.Add(textBindingElement);
|
||||||
|
System.ServiceModel.Channels.HttpsTransportBindingElement httpsBindingElement = new System.ServiceModel.Channels.HttpsTransportBindingElement();
|
||||||
|
httpsBindingElement.AllowCookies = true;
|
||||||
|
httpsBindingElement.MaxBufferSize = int.MaxValue;
|
||||||
|
httpsBindingElement.MaxReceivedMessageSize = int.MaxValue;
|
||||||
|
result.Elements.Add(httpsBindingElement);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration)
|
||||||
|
{
|
||||||
|
if ((endpointConfiguration == EndpointConfiguration.SecureLoginSoap))
|
||||||
|
{
|
||||||
|
return new System.ServiceModel.EndpointAddress("https://webservice-stage.jdpowervalues.com/vehicles/secure/securelogin.asmx");
|
||||||
|
}
|
||||||
|
if ((endpointConfiguration == EndpointConfiguration.SecureLoginSoap12))
|
||||||
|
{
|
||||||
|
return new System.ServiceModel.EndpointAddress("https://webservice-stage.jdpowervalues.com/vehicles/secure/securelogin.asmx");
|
||||||
|
}
|
||||||
|
throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration));
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum EndpointConfiguration
|
||||||
|
{
|
||||||
|
|
||||||
|
SecureLoginSoap,
|
||||||
|
|
||||||
|
SecureLoginSoap12,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+74
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://webservice.jdpowervalues.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://webservice.jdpowervalues.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||||
|
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">This is JDPA Web Service into its Login methods.</wsdl:documentation>
|
||||||
|
<wsdl:types>
|
||||||
|
<s:schema elementFormDefault="qualified" targetNamespace="http://webservice.jdpowervalues.com/">
|
||||||
|
<s:element name="getToken">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="tokenRequest" type="tns:GetTokenRequest" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
<s:complexType name="GetTokenRequest">
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string" />
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
<s:element name="getTokenResponse">
|
||||||
|
<s:complexType>
|
||||||
|
<s:sequence>
|
||||||
|
<s:element minOccurs="0" maxOccurs="1" name="getTokenResult" type="s:string" />
|
||||||
|
</s:sequence>
|
||||||
|
</s:complexType>
|
||||||
|
</s:element>
|
||||||
|
</s:schema>
|
||||||
|
</wsdl:types>
|
||||||
|
<wsdl:message name="getTokenSoapIn">
|
||||||
|
<wsdl:part name="parameters" element="tns:getToken" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getTokenSoapOut">
|
||||||
|
<wsdl:part name="parameters" element="tns:getTokenResponse" />
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:portType name="SecureLoginSoap">
|
||||||
|
<wsdl:operation name="getToken">
|
||||||
|
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Logs the user in and returns a valid token.</wsdl:documentation>
|
||||||
|
<wsdl:input message="tns:getTokenSoapIn" />
|
||||||
|
<wsdl:output message="tns:getTokenSoapOut" />
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:portType>
|
||||||
|
<wsdl:binding name="SecureLoginSoap" type="tns:SecureLoginSoap">
|
||||||
|
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||||
|
<wsdl:operation name="getToken">
|
||||||
|
<soap:operation soapAction="http://webservice.jdpowervalues.com/getToken" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:binding name="SecureLoginSoap12" type="tns:SecureLoginSoap">
|
||||||
|
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||||
|
<wsdl:operation name="getToken">
|
||||||
|
<soap12:operation soapAction="http://webservice.jdpowervalues.com/getToken" style="document" />
|
||||||
|
<wsdl:input>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap12:body use="literal" />
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:service name="SecureLogin">
|
||||||
|
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">This is JDPA Web Service into its Login methods.</wsdl:documentation>
|
||||||
|
<wsdl:port name="SecureLoginSoap" binding="tns:SecureLoginSoap">
|
||||||
|
<soap:address location="https://webservice-stage.jdpowervalues.com/vehicles/secure/securelogin.asmx" />
|
||||||
|
</wsdl:port>
|
||||||
|
<wsdl:port name="SecureLoginSoap12" binding="tns:SecureLoginSoap12">
|
||||||
|
<soap12:address location="https://webservice-stage.jdpowervalues.com/vehicles/secure/securelogin.asmx" />
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
</wsdl:definitions>
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"ExtendedData": {
|
||||||
|
"inputs": [
|
||||||
|
"http://webservice-stage.jdpowervalues.com/vehicles/vehicle.asmx?wsdl"
|
||||||
|
],
|
||||||
|
"collectionTypes": [
|
||||||
|
"System.Array",
|
||||||
|
"System.Collections.Generic.Dictionary`2"
|
||||||
|
],
|
||||||
|
"namespaceMappings": [
|
||||||
|
"*, JdpVehicle"
|
||||||
|
],
|
||||||
|
"targetFramework": "netcoreapp2.2",
|
||||||
|
"typeReuseMode": "All"
|
||||||
|
}
|
||||||
|
}
|
||||||
+3503
File diff suppressed because it is too large
Load Diff
+1597
File diff suppressed because it is too large
Load Diff
+9
@@ -0,0 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Exceptions
|
||||||
|
{
|
||||||
|
public class DuplicateResourceException : Exception
|
||||||
|
{
|
||||||
|
public DuplicateResourceException(string resourceType) : base($"Duplicate Resources of type {resourceType} were found.") { }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Exceptions
|
||||||
|
{
|
||||||
|
public class MaxItemException : Exception
|
||||||
|
{
|
||||||
|
public MaxItemException(int itemCount) : base("Too Many Items Were Produced Than Were Allowed.") {
|
||||||
|
ItemCount = itemCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ItemCount { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Exceptions
|
||||||
|
{
|
||||||
|
public class UnwantedStatusException : Exception
|
||||||
|
{
|
||||||
|
public UnwantedStatusException(int repoId, string accountNo) : base($"Account Number {accountNo} with Repossession ID {repoId} is in Cancelled or Redeemed status") { }
|
||||||
|
}
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
using System.Linq;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Extensions
|
||||||
|
{
|
||||||
|
public static class QueryableIncludeAll
|
||||||
|
{
|
||||||
|
public static IQueryable<RepoAccount> IncludeAll(this IQueryable<RepoAccount> queryable)
|
||||||
|
{
|
||||||
|
return queryable
|
||||||
|
.Include(repo => repo.Borrowers)
|
||||||
|
.Include(repo => repo.Collaterals)
|
||||||
|
.ThenInclude(collateral => collateral.RepoCompanySelections)
|
||||||
|
.Include(repo => repo.RepoStatusChanges)
|
||||||
|
.Include(repo => repo.RefundStatus)
|
||||||
|
.Include(repo => repo.SixtyPlusCollector)
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IQueryable<AuctionAssignment> IncludeAll(this IQueryable<AuctionAssignment> queryable)
|
||||||
|
{
|
||||||
|
return queryable
|
||||||
|
.Include(auctionAssignment => auctionAssignment.Auction)
|
||||||
|
.Include(auctionAssignment => auctionAssignment.AutoIMS)
|
||||||
|
.Include(auctionAssignment => auctionAssignment.FloorPriceValuesUsed)
|
||||||
|
.ThenInclude(fpvu => fpvu.CollateralValuation)
|
||||||
|
.Include(auctionAssignment => auctionAssignment.AuctionAssignmentToCollaterals)
|
||||||
|
.ThenInclude(aa2c => aa2c.Collateral);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IQueryable<Collateral> IncludeAll(this IQueryable<Collateral> queryable)
|
||||||
|
{
|
||||||
|
return queryable.Include(collateral => collateral.RepoCompanySelections);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+29
@@ -0,0 +1,29 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="EntityFramework" Version="6.5.1" />
|
||||||
|
<PackageReference Include="LCU.API.Collections.CollectionsApiLib" Version="1.11.0" />
|
||||||
|
<PackageReference Include="LCU.Library.Internal.LcuClassPatterns.Crud" Version="2.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.3" />
|
||||||
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.3" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Http" Version="9.0.3" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
<PackageReference Include="Serilog" Version="4.2.0" />
|
||||||
|
<PackageReference Include="System.ComponentModel" Version="4.3.0" />
|
||||||
|
<PackageReference Include="System.ServiceModel.Duplex" Version="6.0.0" />
|
||||||
|
<PackageReference Include="System.ServiceModel.Http" Version="8.1.2" />
|
||||||
|
<PackageReference Include="System.ServiceModel.NetTcp" Version="8.1.2" />
|
||||||
|
<PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\LCU.Library.Internal.RepoApiModels\LCU.Library.Internal.RepoApiModels.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class AuctionAssignment
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string AuctionId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int? RepoId { get; set; }
|
||||||
|
public string AuctionCustomerNo { get; set; }
|
||||||
|
public string CollateralVIN { get; set; }
|
||||||
|
public DateTime? DateSubmitted { get; set; }
|
||||||
|
public decimal? FloorPrice { get; set; }
|
||||||
|
public int? FloorPriceResponseCode { get; set; }
|
||||||
|
public string FloorPriceResponseDescription { get; set; }
|
||||||
|
public string FloorPriceSubmissionErrors { get; set; }
|
||||||
|
public int? HoldStatus { get; set; }
|
||||||
|
public DateTime? HoldUntil { get; set; }
|
||||||
|
public DateTime? RedeemedDate { get; set; }
|
||||||
|
public int? VehicleType { get; set; }
|
||||||
|
public string BodyStyle { get; set; }
|
||||||
|
public bool? Inoperable { get; set; }
|
||||||
|
public decimal? RetailValue { get; set; }
|
||||||
|
public string AuctionNotes { get; set; }
|
||||||
|
public DateTime? AvailablePickupDate { get; set; }
|
||||||
|
public DateTime? LegalSaleDate { get; set; }
|
||||||
|
public int? CleaningLevel { get; set; }
|
||||||
|
public int? SubmissionResponseCode { get; set; }
|
||||||
|
public string SubmissionResponseDescription { get; set; }
|
||||||
|
public string SubmissionErrors { get; set; }
|
||||||
|
public DateTime? SentTitleDocsDate { get; set; }
|
||||||
|
public int? TitleSentResponseCode { get; set; }
|
||||||
|
public string TitleSentResponseDescription { get; set; }
|
||||||
|
public string TitleSentSubmissionErrors { get; set; }
|
||||||
|
public bool? AddedThroughRepoDatabase { get; set; }
|
||||||
|
public bool IsActive { get; set; }
|
||||||
|
|
||||||
|
public ImsAutoFileData AutoIMS { get; set; }
|
||||||
|
public AuctionHouse Auction { get; set; }
|
||||||
|
public IEnumerable<AuctionAssignmentToCollateral> AuctionAssignmentToCollaterals { get; set; }
|
||||||
|
public FloorPriceValuesUsed FloorPriceValuesUsed { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class AuctionAssignmentNote
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Id { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int AuctionAssignmentId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string AuctionCustomerNo { get; set; }
|
||||||
|
public string Origin { get; set; }
|
||||||
|
public string Writer { get; set; }
|
||||||
|
public string Type { get; set; }
|
||||||
|
public string Text { get; set; }
|
||||||
|
public DateTime? DateWritten { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class AuctionAssignmentToCollateral
|
||||||
|
{
|
||||||
|
[Key]
|
||||||
|
public int AuctionAssignmentId { get; set; }
|
||||||
|
[Key]
|
||||||
|
public int CollateralId { get; set; }
|
||||||
|
public AuctionAssignment AuctionAssignment { get; set; }
|
||||||
|
public Collateral Collateral { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class AuctionHouse
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public string AuctionID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Active { get; set; }
|
||||||
|
public string Address_Line_1 { get; set; }
|
||||||
|
public string Address_Line_2 { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public string State { get; set; }
|
||||||
|
public string ZIP { get; set; }
|
||||||
|
public string Country { get; set; }
|
||||||
|
public string Phone { get; set; }
|
||||||
|
public string Fax { get; set; }
|
||||||
|
public decimal? Latitude { get; set; }
|
||||||
|
public decimal? Longitude { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class AuditRecord
|
||||||
|
{
|
||||||
|
public int ID { get; set; }
|
||||||
|
// Name of object modified
|
||||||
|
public string ClassName { get; set; }
|
||||||
|
// category of modification
|
||||||
|
public string Action { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string PerformedBy { get; set; }
|
||||||
|
public System.DateTime DatePerformed { get; set; }
|
||||||
|
// The ID representation of the object modified
|
||||||
|
public string KeyRepresentation { get; set; }
|
||||||
|
// Don't want to use, but this is a json of the whole object currently
|
||||||
|
public string PropertyValues { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.AutoIms
|
||||||
|
{
|
||||||
|
public class FtpConfiguration
|
||||||
|
{
|
||||||
|
public string HostName { get; set; }
|
||||||
|
public string UserName { get; set; }
|
||||||
|
public int Port { get; set; }
|
||||||
|
public string ExecutablePath { get; set; }
|
||||||
|
public string SshHostKeyFingerprint { get; set; }
|
||||||
|
public string SshPrivateKeyPath { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+42
@@ -0,0 +1,42 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Microsoft.EntityFrameworkCore.Internal;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.AutoIms
|
||||||
|
{
|
||||||
|
public class ImportResultRow
|
||||||
|
{
|
||||||
|
public bool Success { get; set; }
|
||||||
|
public List<string> Messages { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public ImsAutoFileData Data { get; set; }
|
||||||
|
public RepoAccount RepoAccount { get; set; }
|
||||||
|
|
||||||
|
public string BuildStatusReport(string repoManagerUrl)
|
||||||
|
{
|
||||||
|
var report = new List<string>();
|
||||||
|
var success = Success ? "Success" : "Failure";
|
||||||
|
if (RepoAccount != null)
|
||||||
|
{
|
||||||
|
report.Add(CreateRepoLink(RepoAccount, repoManagerUrl));
|
||||||
|
}
|
||||||
|
if(RepoAccount == null && Data != null)
|
||||||
|
{
|
||||||
|
report.Add($"Auto IMS Update for {Data.VIN}, no Repo Account.");
|
||||||
|
}
|
||||||
|
report.Add($"{success} : {Description}");
|
||||||
|
if (Messages != null && Messages.Any())
|
||||||
|
{
|
||||||
|
report.AddRange(Messages);
|
||||||
|
}
|
||||||
|
|
||||||
|
return report.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string CreateRepoLink(RepoAccount account, string repoManagerUrl)
|
||||||
|
{
|
||||||
|
var url = repoManagerUrl + account.RepoId;
|
||||||
|
var link = string.Format("<a href={0}>{1}</a>", url, $"Account {account.RepoId} ({account.AccountNo})") ;
|
||||||
|
return link;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.AutoIms
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* This models the rows in the CSV File so that they can be different from the rows in SQL
|
||||||
|
*/
|
||||||
|
public class ImsAutoFileImportData
|
||||||
|
{
|
||||||
|
public string AnnouncedConditions { get; set; }
|
||||||
|
public string ArbitrationReason { get; set; }
|
||||||
|
public string AsIs100KMiles { get; set; }
|
||||||
|
public string AssignmentAccepted { get; set; }
|
||||||
|
public string AuctionAge { get; set; }
|
||||||
|
public string AuctionGuideBookPrice { get; set; }
|
||||||
|
public string BuyerID { get; set; }
|
||||||
|
public string BuyerName { get; set; }
|
||||||
|
public string ChargeAmount { get; set; }
|
||||||
|
public string CheckAmount { get; set; }
|
||||||
|
public string ClientAge { get; set; }
|
||||||
|
public string ClientCancelled { get; set; }
|
||||||
|
public string CollisionDamage { get; set; }
|
||||||
|
public string InspectedDate { get; set; }
|
||||||
|
public string DateofLoss { get; set; }
|
||||||
|
public string DatePickedUp { get; set; }
|
||||||
|
public string DateEnteredAutoIMS { get; set; }
|
||||||
|
public string DaysRun { get; set; }
|
||||||
|
public string DaysRunHighestBidRecordedbyAuction { get; set; }
|
||||||
|
public string DaystoDelivery { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string Drivable { get; set; }
|
||||||
|
public string FloorPriceAccepted { get; set; }
|
||||||
|
public string FundsSent { get; set; }
|
||||||
|
public string GrossPercentFloor { get; set; }
|
||||||
|
public string HighestBid { get; set; }
|
||||||
|
public string StatedMileage { get; set; }
|
||||||
|
public string NetPercentFloor { get; set; }
|
||||||
|
public string OtherAdvanceFees { get; set; }
|
||||||
|
public string OTHERTotal { get; set; }
|
||||||
|
public string OTHERAdvancedOther { get; set; }
|
||||||
|
public string OTHERAdvancedStorage { get; set; }
|
||||||
|
public string OTHERAdvancedTow { get; set; }
|
||||||
|
public string OTHERMiscellaneous { get; set; }
|
||||||
|
public string SalePrice { get; set; }
|
||||||
|
public string ScheduledSaleDate { get; set; }
|
||||||
|
public string SoldDate { get; set; }
|
||||||
|
public string TitleNumber { get; set; }
|
||||||
|
public string TitleReceived { get; set; }
|
||||||
|
public string TitleReturned { get; set; }
|
||||||
|
public string TitleState { get; set; }
|
||||||
|
public string TitleStatus { get; set; }
|
||||||
|
public string TitleStatusfromAuction { get; set; }
|
||||||
|
public string TotalCharges { get; set; }
|
||||||
|
public string Operable { get; set; }
|
||||||
|
public string ShipmentDate { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
public string VIN { get; set; }
|
||||||
|
public string StorageCost { get; set; }
|
||||||
|
public string StorageRatePerDay { get; set; }
|
||||||
|
public string TowCost { get; set; }
|
||||||
|
public string CustomerAccountNumber { get; set; }
|
||||||
|
public string DateReceivedFromAutoIMS { get; set; }
|
||||||
|
public string VehicleDecimalGradeCode { get; set; }
|
||||||
|
public string VehicleGrade { get; set; }
|
||||||
|
public string VehicleGradeApprovedCR { get; set; }
|
||||||
|
public string MMRNationalAdjustedPrice { get; set; }
|
||||||
|
public string MMRRegionalAdjustedPrice { get; set; }
|
||||||
|
public string MMR { get; set; }
|
||||||
|
public string ConditionReportLink { get; set; }
|
||||||
|
public string CollateralImagePath { get; set; }
|
||||||
|
public string AuctionAssignmentID { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class Borrower
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string IndividualId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int OwnershipType { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string IndividualName { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("RepoId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public RepoAccount RepoAccount { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class ClientError
|
||||||
|
{
|
||||||
|
public string Message { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string StackTrace { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class Collateral
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int CollateralId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
public string? Vin { get; set; }
|
||||||
|
public string? Make { get; set; }
|
||||||
|
public string? Model { get; set; }
|
||||||
|
public int? Year { get; set; }
|
||||||
|
public string? Description { get; set; }
|
||||||
|
public int? VehicleType { get; set; }
|
||||||
|
public string? BodyStyle { get; set; }
|
||||||
|
public bool? Inoperable { get; set; }
|
||||||
|
public int? CollateralTypeId { get; set; }
|
||||||
|
public DateTime? RetitledInLandmarkName { get; set; }
|
||||||
|
public string? RefCollateralId { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("CollateralId")]
|
||||||
|
public IReadOnlyCollection<RepoCompanySelection> RepoCompanySelections { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("RepoId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public RepoAccount RepoAccount { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public IEnumerable<AuctionAssignmentToCollateral> AuctionAssignmentToCollaterals { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class AddressDetail
|
||||||
|
{
|
||||||
|
public int AddressId { get; set; }
|
||||||
|
public string Line1 { get; set; }
|
||||||
|
public string Line2 { get; set; }
|
||||||
|
public string Line3 { get; set; }
|
||||||
|
public string City { get; set; }
|
||||||
|
public string State { get; set; }
|
||||||
|
public string ZipCode { get; set; }
|
||||||
|
public string Country { get; set; }
|
||||||
|
public string CountyName { get; set; }
|
||||||
|
public string AddressType { get; set; }
|
||||||
|
public bool IsPrimary { get; set; }
|
||||||
|
public bool IsInternational { get; set; }
|
||||||
|
public int AddressVerification { get; set; }
|
||||||
|
public string Occupancy { get; set; }
|
||||||
|
public System.DateTime StartDate { get; set; }
|
||||||
|
public System.DateTime EndDate { get; set; }
|
||||||
|
public string LongAddress1 { get; set; }
|
||||||
|
public string LongAddress2 { get; set; }
|
||||||
|
public string[] Membership { get; set; }
|
||||||
|
public string[] CoBorrower { get; set; }
|
||||||
|
public System.DateTime UseAlternateAsOf { get; set; }
|
||||||
|
public System.DateTime RestorePrimaryAsOf { get; set; }
|
||||||
|
public string AlternateType { get; set; }
|
||||||
|
public string Comments { get; set; }
|
||||||
|
public string Met2AddressIndicator { get; set; }
|
||||||
|
public bool UspsVerified { get; set; }
|
||||||
|
public string AddressMatchStatus { get; set; }
|
||||||
|
public bool IsHSA { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class AppraisalDetail
|
||||||
|
{
|
||||||
|
public decimal OriginalAppraisedValue { get; set; }
|
||||||
|
public string OriginalAppraisedBy { get; set; }
|
||||||
|
public string OriginalAppraisalType { get; set; }
|
||||||
|
public System.DateTime OriginalAppraisalDate { get; set; }
|
||||||
|
public decimal LastAppraisedValue { get; set; }
|
||||||
|
public string LastAppraisedBy { get; set; }
|
||||||
|
public string LastAppraisalType { get; set; }
|
||||||
|
public System.DateTime LastAppraisalDate { get; set; }
|
||||||
|
public bool OriginalAppraisalProvided { get; set; }
|
||||||
|
public System.DateTime OriginalDateProvided { get; set; }
|
||||||
|
public int OriginalProvidedByOperatorID { get; set; }
|
||||||
|
public string OriginalProvidedByOperatorName { get; set; }
|
||||||
|
public string OriginalDeliveryMethod { get; set; }
|
||||||
|
public bool LastAppraisalProvided { get; set; }
|
||||||
|
public System.DateTime LastDateProvided { get; set; }
|
||||||
|
public int LastProvidedByOperatorID { get; set; }
|
||||||
|
public string LastProvidedByOperatorName { get; set; }
|
||||||
|
public string LastDeliveryMethod { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+28
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class CollateralDetail
|
||||||
|
{
|
||||||
|
public int CollateralId { get; set; }
|
||||||
|
public int OwnerId { get; set; }
|
||||||
|
public string OwnerName { get; set; }
|
||||||
|
public string CollateralType { get; set; }
|
||||||
|
public string NameOnTitle { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public decimal PurchasePrice { get; set; }
|
||||||
|
public decimal CurrentValue { get; set; }
|
||||||
|
public string SourceOfEvaluation { get; set; }
|
||||||
|
public System.DateTime EvaluationDate { get; set; }
|
||||||
|
public int ValueVerifiedByOperatorNumber { get; set; }
|
||||||
|
public string ValueVerifiedByOperatorName { get; set; }
|
||||||
|
public string VerificationMethod { get; set; }
|
||||||
|
public System.DateTime VerificationDate { get; set; }
|
||||||
|
public int VerifiedBy { get; set; }
|
||||||
|
public string SerialNumber { get; set; }
|
||||||
|
public Vehicle Vehicle { get; set; }
|
||||||
|
public OtherCollateral Other { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
// NOTE: This currently does not contain all possible fields.
|
||||||
|
// Instead, it only contains the fields necessary.
|
||||||
|
// NOTE NOTE: This class will change heavily.
|
||||||
|
public class CoreTransaction
|
||||||
|
{
|
||||||
|
public decimal? runningBalance { get; set; }
|
||||||
|
public DateTime? postingDate { get; set; }
|
||||||
|
public decimal? amount { get; set; }
|
||||||
|
public string transactionTypeCode { get; set; }
|
||||||
|
public string transactionTypeDescription { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+268
@@ -0,0 +1,268 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class LoanDetail
|
||||||
|
{
|
||||||
|
public long MemberId { get; set; }
|
||||||
|
public long LoanId { get; set; }
|
||||||
|
public long ExternalLoanId { get; set; }
|
||||||
|
public int[] IndividualId { get; set; }
|
||||||
|
public List<LoanOwner> Borrowers { get; set; }
|
||||||
|
public string LoanType { get; set; }
|
||||||
|
public string Title { get; set; }
|
||||||
|
public string Alerts { get; set; }
|
||||||
|
public string Product { get; set; }
|
||||||
|
public int ProductCode { get; set; }
|
||||||
|
public string Template { get; set; }
|
||||||
|
public int ProductId { get; set; }
|
||||||
|
public string ProductDescription { get; set; }
|
||||||
|
public string ProductCategory { get; set; }
|
||||||
|
public string ProductClass { get; set; }
|
||||||
|
public int AccountType { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
public System.DateTime ClosedDate { get; set; }
|
||||||
|
public string Category { get; set; }
|
||||||
|
public string Classification { get; set; }
|
||||||
|
public string MetroAcctType { get; set; }
|
||||||
|
public string SMSA { get; set; }
|
||||||
|
public string Officer { get; set; }
|
||||||
|
public string OtherSecurity { get; set; }
|
||||||
|
public string NoteNumber { get; set; }
|
||||||
|
public System.DateTime LastMaintenance { get; set; }
|
||||||
|
public System.DateTime WrittenOffDate { get; set; }
|
||||||
|
public string CreditCardNumber { get; set; }
|
||||||
|
public System.DateTime LastCycleDate { get; set; }
|
||||||
|
public string LegalDescription { get; set; }
|
||||||
|
public string PropertyType { get; set; }
|
||||||
|
public string PurposeCode { get; set; }
|
||||||
|
public string CollateralCode { get; set; }
|
||||||
|
public string RefinanceCount { get; set; }
|
||||||
|
public System.DateTime LastRefinanceDate { get; set; }
|
||||||
|
public string LdcNumber { get; set; }
|
||||||
|
public string Messages { get; set; }
|
||||||
|
public decimal OriginalAmount { get; set; }
|
||||||
|
public System.DateTime OriginationDate { get; set; }
|
||||||
|
public decimal Balance { get; set; }
|
||||||
|
public decimal AvailableBalance { get; set; }
|
||||||
|
public decimal Limit { get; set; }
|
||||||
|
public decimal EscrowBalance { get; set; }
|
||||||
|
public decimal Payoff { get; set; }
|
||||||
|
public decimal UnappliedFundsBalance { get; set; }
|
||||||
|
public decimal CashAdvanceBalance { get; set; }
|
||||||
|
public decimal PurchaseAdvanceBalance { get; set; }
|
||||||
|
public decimal ActiveAuthorizationAmount { get; set; }
|
||||||
|
public decimal EscrowDividends { get; set; }
|
||||||
|
public string PledgeType { get; set; }
|
||||||
|
public string MiscCharge1 { get; set; }
|
||||||
|
public string MiscCharge2 { get; set; }
|
||||||
|
public string MiscCharge3 { get; set; }
|
||||||
|
public string MiscChargeCode1 { get; set; }
|
||||||
|
public string MiscChargeCode2 { get; set; }
|
||||||
|
public string MiscChargeCode3 { get; set; }
|
||||||
|
public decimal InterestMemoed { get; set; }
|
||||||
|
public System.DateTime InterestAccruedDate { get; set; }
|
||||||
|
public decimal PaymentInterestDue { get; set; }
|
||||||
|
public decimal PayoffInterestDue { get; set; }
|
||||||
|
public string LateChargeMethod { get; set; }
|
||||||
|
public decimal LateCharge { get; set; }
|
||||||
|
public System.DateTime LateChargeDate { get; set; }
|
||||||
|
public decimal CashAdvance { get; set; }
|
||||||
|
public string Insurance { get; set; }
|
||||||
|
public decimal LastStatementLateCharges { get; set; }
|
||||||
|
public decimal LastStatementMiscFees { get; set; }
|
||||||
|
public decimal LastStatementPurchaseAdvances { get; set; }
|
||||||
|
public decimal LastStatementCashAdvances { get; set; }
|
||||||
|
public decimal LastStatementCashAdvanceFees { get; set; }
|
||||||
|
public decimal LastStatementMiscDebits { get; set; }
|
||||||
|
public decimal LastStatementTotalPayments { get; set; }
|
||||||
|
public decimal LastStatementCreditsPosted { get; set; }
|
||||||
|
public decimal LastStatementAccruedInterest { get; set; }
|
||||||
|
public System.DateTime LastStatementDate { get; set; }
|
||||||
|
public decimal LastStatementPurchaseAdvanceBalance { get; set; }
|
||||||
|
public decimal LastStatementEndingBalance { get; set; }
|
||||||
|
public decimal DelinquentAmount { get; set; }
|
||||||
|
public decimal LastStatementMonthlyMinimum { get; set; }
|
||||||
|
public decimal LastStatementRequiredDue { get; set; }
|
||||||
|
public decimal LastStatementRequiredPayment { get; set; }
|
||||||
|
public decimal ScheduledPayment { get; set; }
|
||||||
|
public System.DateTime NextDueDate { get; set; }
|
||||||
|
public decimal PartialPaymentAmount { get; set; }
|
||||||
|
public System.DateTime PreviousDate { get; set; }
|
||||||
|
public string PaymentFrequency { get; set; }
|
||||||
|
public System.DateTime AlignmentDate { get; set; }
|
||||||
|
public string PaymentMethod { get; set; }
|
||||||
|
public string SourceAccount { get; set; }
|
||||||
|
public string ProcessingGroup { get; set; }
|
||||||
|
public System.DateTime LoanCouponDate { get; set; }
|
||||||
|
public decimal RequiredPaymentDue { get; set; }
|
||||||
|
public System.DateTime FirstPaymentDate { get; set; }
|
||||||
|
public decimal AlternatePaymentAmount { get; set; }
|
||||||
|
public System.DateTime AlternateBeginDate { get; set; }
|
||||||
|
public System.DateTime AlternateEndDate { get; set; }
|
||||||
|
public int PaymentSkips { get; set; }
|
||||||
|
public decimal FinalPaymentAmount { get; set; }
|
||||||
|
public System.DateTime FinalPaymentDate { get; set; }
|
||||||
|
public decimal CycleAmount { get; set; }
|
||||||
|
public string VariableRatePaymentChange { get; set; }
|
||||||
|
public string VariableRateCode { get; set; }
|
||||||
|
public decimal MinimumDue { get; set; }
|
||||||
|
public decimal FrequencyPayment { get; set; }
|
||||||
|
public decimal EscrowPayment { get; set; }
|
||||||
|
public decimal PrincipalAndInterestPayment { get; set; }
|
||||||
|
public string PaymentLoanDefinitionNumber { get; set; }
|
||||||
|
public string RateLoanDefinitionNumber { get; set; }
|
||||||
|
public int VacationWeeks { get; set; }
|
||||||
|
public int PayrollRepaidWeeklyPaymentCount { get; set; }
|
||||||
|
public decimal BaseRate { get; set; }
|
||||||
|
public decimal TieredRateAdj { get; set; }
|
||||||
|
public decimal ManualRateAdj { get; set; }
|
||||||
|
public decimal Rate { get; set; }
|
||||||
|
public decimal ManualRate { get; set; }
|
||||||
|
public decimal APR { get; set; }
|
||||||
|
public decimal OriginalInterestRate { get; set; }
|
||||||
|
public decimal AlternateInterestRate { get; set; }
|
||||||
|
public System.DateTime LastRateChange { get; set; }
|
||||||
|
public decimal RealEstateMargin { get; set; }
|
||||||
|
public string Amortization { get; set; }
|
||||||
|
public int AmortizationTerm { get; set; }
|
||||||
|
public int MonthlyTerm { get; set; }
|
||||||
|
public int NumberOfPayments { get; set; }
|
||||||
|
public decimal InterestYTD { get; set; }
|
||||||
|
public decimal InterestPYTD { get; set; }
|
||||||
|
public decimal InterestDaily { get; set; }
|
||||||
|
public decimal PrincipalYTD { get; set; }
|
||||||
|
public decimal PrincipalPYTD { get; set; }
|
||||||
|
public decimal LateChargeYTD { get; set; }
|
||||||
|
public decimal LateChargePYTD { get; set; }
|
||||||
|
public string PaymentHistory { get; set; }
|
||||||
|
public System.DateTime LastPaymentDue { get; set; }
|
||||||
|
public int PaymentsPastDue { get; set; }
|
||||||
|
public int DaysPastDue { get; set; }
|
||||||
|
public int MonthsPastDue { get; set; }
|
||||||
|
public decimal CurrentStatementLateCharges { get; set; }
|
||||||
|
public decimal CurrentStatementMiscFees { get; set; }
|
||||||
|
public decimal CurrentStatementPurchaseAdvances { get; set; }
|
||||||
|
public decimal CurrentStatementCashAdvances { get; set; }
|
||||||
|
public decimal CurrentStatementCashAdvanceFees { get; set; }
|
||||||
|
public decimal CurrentStatementMiscDebits { get; set; }
|
||||||
|
public decimal CurrentStatementTotalPayments { get; set; }
|
||||||
|
public decimal CurrentStatementTotalCredits { get; set; }
|
||||||
|
public System.DateTime DelinquentPaymentDueDate { get; set; }
|
||||||
|
public bool IsInactive { get; set; }
|
||||||
|
public string StatementFrequency { get; set; }
|
||||||
|
public decimal AppraisedValue { get; set; }
|
||||||
|
public int LocCycleDay { get; set; }
|
||||||
|
public bool IgnorePledge { get; set; }
|
||||||
|
public bool OpenEndPlan { get; set; }
|
||||||
|
public string OpenEndCategory { get; set; }
|
||||||
|
public decimal PointsPaid { get; set; }
|
||||||
|
public decimal CurtailmentAmount { get; set; }
|
||||||
|
public System.DateTime CurtailmentDate { get; set; }
|
||||||
|
public System.DateTime InsuranceExpirationDate { get; set; }
|
||||||
|
public string LifeInsuranceMI { get; set; }
|
||||||
|
public string DisabilityInsuranceMI { get; set; }
|
||||||
|
public string LifeActivityInsuranceCode { get; set; }
|
||||||
|
public string DisabilityActivityInsuranceCode { get; set; }
|
||||||
|
public bool LoanCoupons { get; set; }
|
||||||
|
public bool PaidbyGrace { get; set; }
|
||||||
|
public string EscrowAccount { get; set; }
|
||||||
|
public bool EscrowInterestPaid { get; set; }
|
||||||
|
public System.DateTime NextPaymentAdjustmentDate { get; set; }
|
||||||
|
public decimal EffectivePayment { get; set; }
|
||||||
|
|
||||||
|
public decimal InterestRate { get; set; }
|
||||||
|
|
||||||
|
public System.DateTime LastPaymentDate { get; set; }
|
||||||
|
public System.DateTime LastPurchaseDate { get; set; }
|
||||||
|
public System.DateTime LastCashAdvanceDate { get; set; }
|
||||||
|
public string BlockCode { get; set; }
|
||||||
|
public string ReclassCode { get; set; }
|
||||||
|
public int OutstandingAuthCount { get; set; }
|
||||||
|
public decimal OutstandingAuthAmount { get; set; }
|
||||||
|
public string InterestType { get; set; }
|
||||||
|
public string AlternateLoanNumber { get; set; }
|
||||||
|
public int ArmIndex { get; set; }
|
||||||
|
public string DeductionOption { get; set; }
|
||||||
|
public bool DelinquentPaymentSkips { get; set; }
|
||||||
|
public bool FirstPayment { get; set; }
|
||||||
|
public decimal InterestDue { get; set; }
|
||||||
|
public bool LoanLevelSkips { get; set; }
|
||||||
|
public bool PaymentReduction { get; set; }
|
||||||
|
public bool WaiveLateCharge { get; set; }
|
||||||
|
public int ExcessPaymentTargetAccountId { get; set; }
|
||||||
|
public long ExcessPaymentMemberId { get; set; }
|
||||||
|
public bool CustRate { get; set; }
|
||||||
|
public string IntRateMethod { get; set; }
|
||||||
|
public decimal Margin { get; set; }
|
||||||
|
public string Index { get; set; }
|
||||||
|
public decimal RndFactPct { get; set; }
|
||||||
|
public string RndFactOpt { get; set; }
|
||||||
|
public decimal IntRateCeiling { get; set; }
|
||||||
|
public decimal IntRateFloor { get; set; }
|
||||||
|
public decimal MaxDnRateChgLife { get; set; }
|
||||||
|
public decimal MaxUpRateChgLife { get; set; }
|
||||||
|
public decimal MaxDnRateChgPeriod { get; set; }
|
||||||
|
public decimal MaxUpRateChgPeriod { get; set; }
|
||||||
|
public decimal MinDnRateChgPeriod { get; set; }
|
||||||
|
public decimal MinUpRateChgPeriod { get; set; }
|
||||||
|
public short PmtAdjPeriod { get; set; }
|
||||||
|
public short DaysPriorToPeriodicRateAdj { get; set; }
|
||||||
|
public short DaysPriorToInitialRateAdjustment { get; set; }
|
||||||
|
public bool FirstAdjustmentIsEstimate { get; set; }
|
||||||
|
public System.DateTime InitialAnalysisEstimateDate { get; set; }
|
||||||
|
public string EstimatePerformed { get; set; }
|
||||||
|
|
||||||
|
public int BalloonTerm { get; set; }
|
||||||
|
|
||||||
|
public string PledgeTypeDescription { get; set; }
|
||||||
|
|
||||||
|
public string SystemApproved { get; set; }
|
||||||
|
|
||||||
|
public string[] VINList { get; set; }
|
||||||
|
|
||||||
|
public long? MortgageLoanOriginator { get; set; }
|
||||||
|
public decimal? LastPaymentPrincipal { get; set; }
|
||||||
|
public decimal? LastPaymentInterest { get; set; }
|
||||||
|
public decimal? LastPaymentFees { get; set; }
|
||||||
|
public decimal? LastPaymentLateCharges { get; set; }
|
||||||
|
public decimal? LastPaymentEscrowImpound { get; set; }
|
||||||
|
public decimal? LastPaymentCurtailment { get; set; }
|
||||||
|
public decimal? LastPaymentTotal { get; set; }
|
||||||
|
public short TransferDay { get; set; }
|
||||||
|
|
||||||
|
public long SourceMember { get; set; }
|
||||||
|
|
||||||
|
public bool AdjustPurchaseAccrual { get; set; }
|
||||||
|
public bool AnnualFee { get; set; }
|
||||||
|
public System.DateTime AnnualFeeDate { get; set; }
|
||||||
|
public decimal BalaceLimit { get; set; }
|
||||||
|
public bool CloseOnZero { get; set; }
|
||||||
|
public System.DateTime DrawDate { get; set; }
|
||||||
|
public string Form1098Option { get; set; }
|
||||||
|
public bool MethodADelinquency { get; set; }
|
||||||
|
public short? NumberofSkips { get; set; }
|
||||||
|
public decimal OverlimitAmount { get; set; }
|
||||||
|
public System.DateTime OverlimitDate { get; set; }
|
||||||
|
public decimal PurchaseAdvBalance { get; set; }
|
||||||
|
public System.DateTime SkipDate { get; set; }
|
||||||
|
public bool ToBeDelinquent { get; set; }
|
||||||
|
public bool WaiveDelinquencyNotice { get; set; }
|
||||||
|
public bool WaiveBillingNotice { get; set; }
|
||||||
|
public bool WaiveInterest { get; set; }
|
||||||
|
public decimal LastStatementMinimumPayment { get; set; }
|
||||||
|
|
||||||
|
public decimal LastStatementCycleRequiredPayment { get; set; }
|
||||||
|
|
||||||
|
public bool ExemptNonResident { get; set; }
|
||||||
|
public string YTDNonresidentWithholding { get; set; }
|
||||||
|
public string PYTDNonresidentWithholding { get; set; }
|
||||||
|
|
||||||
|
public string InCollection { get; set; }
|
||||||
|
|
||||||
|
public string UniversalLoanId { get; set; }
|
||||||
|
public System.DateTime RateLockDate { get; set; }
|
||||||
|
public string ActiveStopPays { get; set; }
|
||||||
|
public string[] ErrorMessage { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class LoanOwner
|
||||||
|
{
|
||||||
|
public int IndividualId { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string Type { get; set; }
|
||||||
|
public string Address { get; set; }
|
||||||
|
public string TaxId { get; set; }
|
||||||
|
public string Association { get; set; }
|
||||||
|
public System.DateTime LastAssociationCodeChangedDate { get; set; }
|
||||||
|
public string Metro2ConsumerInformationIndicator { get; set; }
|
||||||
|
public bool CoborrowerIsSpouse { get; set; }
|
||||||
|
public decimal OwnershipPercentage { get; set; }
|
||||||
|
public string PercentageDescription { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+55
@@ -0,0 +1,55 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class MemberDetail
|
||||||
|
{
|
||||||
|
public long MemberId { get; set; }
|
||||||
|
public string MemberName { get; set; }
|
||||||
|
public int PrimaryIndividualId { get; set; }
|
||||||
|
public string MemberType { get; set; }
|
||||||
|
public string Affiliation { get; set; }
|
||||||
|
public System.DateTime MemberSince { get; set; }
|
||||||
|
public string Miscellaneous1 { get; set; }
|
||||||
|
public string Miscellaneous2 { get; set; }
|
||||||
|
public string OriginalOpenBranch { get; set; }
|
||||||
|
public string WithholdingCode { get; set; }
|
||||||
|
public decimal ExpeditedFunds { get; set; }
|
||||||
|
public System.DateTime ExpeditedFundsDate { get; set; }
|
||||||
|
public int AccessLevel { get; set; }
|
||||||
|
public int StandardStatementCycle { get; set; }
|
||||||
|
public string StandardStatementCode { get; set; }
|
||||||
|
public string StandardStatementMethod { get; set; }
|
||||||
|
public int CATFeeCounter { get; set; }
|
||||||
|
public System.DateTime CATFeeDate { get; set; }
|
||||||
|
public int CreditCardStatementCycle { get; set; }
|
||||||
|
public string CreditCardStatementCode { get; set; }
|
||||||
|
public string CreditCardStatementMethod { get; set; }
|
||||||
|
public int AccountCount { get; set; }
|
||||||
|
public decimal AccountBalance { get; set; }
|
||||||
|
public int LoanCount { get; set; }
|
||||||
|
public decimal LoanBalance { get; set; }
|
||||||
|
public int LoansDelinquentCount { get; set; }
|
||||||
|
public decimal LoansDelinquent { get; set; }
|
||||||
|
public int LoansWrittenOffCount { get; set; }
|
||||||
|
public decimal LoansWrittenOff { get; set; }
|
||||||
|
public int LoansInCollectionCount { get; set; }
|
||||||
|
public decimal LoansInCollection { get; set; }
|
||||||
|
// public AccountSummary[] Account { get; set; }
|
||||||
|
// public LoanSummary[] Loan { get; set; }
|
||||||
|
// public CrossMemberDetails[] CrossMember { get; set; }
|
||||||
|
public string Password { get; set; }
|
||||||
|
public string PinLock { get; set; }
|
||||||
|
public int BranchId { get; set; }
|
||||||
|
public int RelationshipPricingLevel { get; set; }
|
||||||
|
public string RelationshipPricingLevelPermanent { get; set; }
|
||||||
|
public string RelationshipPricingDescription { get; set; }
|
||||||
|
public int PreviousRelationshipPricingLevel { get; set; }
|
||||||
|
public string LastRelationshipPricingLevelAnalysisDate { get; set; }
|
||||||
|
public string LastRelationshipPricingLevelChangeDate { get; set; }
|
||||||
|
public string InhibitActivity { get; set; }
|
||||||
|
public string WrittenOffLoan { get; set; }
|
||||||
|
public string LoanInCollection { get; set; }
|
||||||
|
public string PurgeMembership { get; set; }
|
||||||
|
public AddressDetail Address { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class OtherCollateral
|
||||||
|
{
|
||||||
|
public string MiscellaneousInformation { get; set; }
|
||||||
|
public AppraisalDetail Appraisal { get; set; }
|
||||||
|
public string OtherCollateralType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Producer;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class QueueResult
|
||||||
|
{
|
||||||
|
public ulong DeliveryTag { get; set; }
|
||||||
|
public ProcessingReceipt Receipt { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Producer;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class RepoRunInfo
|
||||||
|
{
|
||||||
|
public RepoRunInfo()
|
||||||
|
{
|
||||||
|
StartDateTime = DateTime.Now;
|
||||||
|
Receipts = new List<ProcessingReceipt>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime StartDateTime { get; private set; }
|
||||||
|
public DateTime? CompleteDateTime { get; set; }
|
||||||
|
|
||||||
|
public List<ProcessingReceipt> Receipts { get; private set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Consumer
|
||||||
|
{
|
||||||
|
public class Vehicle
|
||||||
|
{
|
||||||
|
public string VIN { get; set; }
|
||||||
|
public int Year { get; set; }
|
||||||
|
public string Make { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
public string LicensePlate { get; set; }
|
||||||
|
public string LicenseState { get; set; }
|
||||||
|
public string CountryLicensed { get; set; }
|
||||||
|
public int Mileage { get; set; }
|
||||||
|
public string BodyStyle { get; set; }
|
||||||
|
public string Color { get; set; }
|
||||||
|
public string KeyCode { get; set; }
|
||||||
|
public string SellerName { get; set; }
|
||||||
|
public decimal LowBookValue { get; set; }
|
||||||
|
public decimal HighBookValue { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
using Microsoft.AspNetCore.Hosting;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class EnvironmentView : IEnvironmentView
|
||||||
|
{
|
||||||
|
public string Application => _env.ApplicationName;
|
||||||
|
public DateTime CurrentDate => DateTime.Now;
|
||||||
|
public string BuildVersion => Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||||
|
public DateTime BuildDate => AssemblyBuildDate();
|
||||||
|
public string Environment => _env.EnvironmentName;
|
||||||
|
private readonly IHostingEnvironment _env;
|
||||||
|
|
||||||
|
public EnvironmentView(IHostingEnvironment env)
|
||||||
|
{
|
||||||
|
_env = env;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static DateTime AssemblyBuildDate()
|
||||||
|
{
|
||||||
|
//https://stackoverflow.com/a/804310/266594
|
||||||
|
//TODO #246: Look up this value at start up to avoid hitting the filesystem repeatedly
|
||||||
|
System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
|
||||||
|
System.IO.FileInfo fileInfo = new System.IO.FileInfo(assembly.Location);
|
||||||
|
DateTime lastModified = fileInfo.LastWriteTime;
|
||||||
|
|
||||||
|
return lastModified;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class EventAlert
|
||||||
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
public int? RepoId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string AccountNo { get; set; }
|
||||||
|
[Required]
|
||||||
|
public DateTime DateAdded { get; set; }
|
||||||
|
public DateTime? DateMarkedRead { get; set; }
|
||||||
|
[Required]
|
||||||
|
[MaxLength(25)]
|
||||||
|
public string CreatedBy { get; set; }
|
||||||
|
public string MarkedReadBy { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Message { get; set; }
|
||||||
|
public int? DayCount { get; set; }
|
||||||
|
public string SubMessage { get; set; }
|
||||||
|
public string EmailRecipient { get; set; }
|
||||||
|
public string EmailBody { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class ExternalUser
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public int ReferenceId { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string Code { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.WebServices.NADA;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class FloorPriceCalculationParams
|
||||||
|
{
|
||||||
|
public ImsAutoFileData ImsAutoFileData { get; set; }
|
||||||
|
public CollateralValuation CollateralValuation { get; set; }
|
||||||
|
public IEnumerable<VehicleFloorPricingParameters> VehicleFloorPricingParameters { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class FloorPriceCalculationResult
|
||||||
|
{
|
||||||
|
public string StrategyName { get; set; }
|
||||||
|
public bool Success { get; set; }
|
||||||
|
public decimal FloorPrice { get; set; }
|
||||||
|
public int ResultWeight { get; set; }
|
||||||
|
public string FailureReason { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+11
@@ -0,0 +1,11 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class FloorPriceCalculationResultSet
|
||||||
|
{
|
||||||
|
public FloorPriceCalculationResult PrimaryResult { get; set; }
|
||||||
|
public IEnumerable<FloorPriceCalculationResult> AllResults { get; set; }
|
||||||
|
public FloorPriceValuesUsed FloorPriceValuesUsed { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+37
@@ -0,0 +1,37 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.WebServices.NADA;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class FloorPriceValuesUsed
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int AuctionAssignmentId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int CollateralValuationId { get; set; }
|
||||||
|
|
||||||
|
public decimal? Condition { get; set; }
|
||||||
|
public decimal LowParam { get; set; }
|
||||||
|
public decimal HighParam { get; set; }
|
||||||
|
public decimal PercentageOf { get; set; }
|
||||||
|
public decimal? AuctionGuideBookPrice { get; set; }
|
||||||
|
public bool WasAuctionGuideBookPriceUsed { get; set; }
|
||||||
|
public decimal? MMRNationalAdjustedPrice { get; set; }
|
||||||
|
public decimal? MMRRegionalAdjustedPrice { get; set; }
|
||||||
|
public bool WasMMRNationalAdjustedPriceUsed { get; set; }
|
||||||
|
public bool WasMMRRegionalAdjustedPriceUsed { get; set; }
|
||||||
|
public int NADALowAdjustedAuctionValue { get; set; }
|
||||||
|
public int NADAAverageAdjustedAuctionValue { get; set; }
|
||||||
|
public int NADAHighAdjustedAuctionValue { get; set; }
|
||||||
|
public bool WasNADALowAdjustedAuctionValueUsed { get; set; }
|
||||||
|
public bool WasNADAAverageAdjustedAuctionValueUsed { get; set; }
|
||||||
|
public bool WasNADAHighAdjustedAuctionValueUsed { get; set; }
|
||||||
|
public decimal? NADAMMRFloorPrice { get; set; }
|
||||||
|
|
||||||
|
public CollateralValuation CollateralValuation { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public interface IEnvironmentView
|
||||||
|
{
|
||||||
|
string Application { get; }
|
||||||
|
DateTime CurrentDate { get; }
|
||||||
|
string BuildVersion { get; }
|
||||||
|
DateTime BuildDate { get; }
|
||||||
|
string Environment { get; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class ImsAutoFileData
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string VIN { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int AuctionAssignmentId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string AuctionCustomerNo { get; set; }
|
||||||
|
|
||||||
|
public DateTime? AssignmentAccepted { get; set; }
|
||||||
|
public DateTime? DateReceivedFromAutoIMS { get; set; }
|
||||||
|
public DateTime? ScheduledSaleDate { get; set; }
|
||||||
|
public DateTime? SoldDate { get; set; }
|
||||||
|
public string AnnouncedConditions { get; set; }
|
||||||
|
public string ArbitrationReason { get; set; }
|
||||||
|
public bool? AsIs100KMiles { get; set; }
|
||||||
|
public int? AuctionAge { get; set; }
|
||||||
|
public decimal? AuctionGuideBookPrice { get; set; }
|
||||||
|
public string BuyerId { get; set; }
|
||||||
|
public string BuyerName { get; set; }
|
||||||
|
public decimal? ChargeAmount { get; set; }
|
||||||
|
public decimal? CheckAmount { get; set; }
|
||||||
|
public int? ClientAge { get; set; }
|
||||||
|
public DateTime? ClientCancelled { get; set; }
|
||||||
|
public string CollisionDamage { get; set; }
|
||||||
|
public DateTime? InspectedDate { get; set; }
|
||||||
|
public DateTime? DateofLoss { get; set; }
|
||||||
|
public DateTime? DatePickedUp { get; set; }
|
||||||
|
public DateTime? DateEnteredAutoIMS { get; set; }
|
||||||
|
public int? DaysRun { get; set; }
|
||||||
|
public string DaysRunHighestBidRecordedbyAuction { get; set; }
|
||||||
|
public int? DaystoDelivery { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public bool? IsDrivable { get; set; }
|
||||||
|
public decimal? FloorPriceAccepted { get; set; }
|
||||||
|
public DateTime? FundsSent { get; set; }
|
||||||
|
public decimal? GrossPercentFloor { get; set; }
|
||||||
|
public decimal? HighestBid { get; set; }
|
||||||
|
public int? StatedMileage { get; set; }
|
||||||
|
public decimal? NetPercentFloor { get; set; }
|
||||||
|
public decimal? OtherAdvanceFees { get; set; }
|
||||||
|
public string OTHERTotal { get; set; }
|
||||||
|
public string OTHERAdvancedOther { get; set; }
|
||||||
|
public string OTHERAdvancedStorage { get; set; }
|
||||||
|
public string OTHERAdvancedTow { get; set; }
|
||||||
|
public string OTHERMiscellaneous { get; set; }
|
||||||
|
public decimal? SalePrice { get; set; }
|
||||||
|
public string TitleNumber { get; set; }
|
||||||
|
public DateTime? TitleReceived { get; set; }
|
||||||
|
public DateTime? TitleReturned { get; set; }
|
||||||
|
public string TitleState { get; set; }
|
||||||
|
public string TitleStatus { get; set; }
|
||||||
|
public string TitleStatusfromAuction { get; set; }
|
||||||
|
public decimal? TotalCharges { get; set; }
|
||||||
|
public decimal? ApprovedVehicleGrade { get; set; }
|
||||||
|
public bool? IsOperable { get; set; }
|
||||||
|
public DateTime? ShipmentDate { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
public decimal? StorageCost { get; set; }
|
||||||
|
public decimal? StorageRatePerDay { get; set; }
|
||||||
|
public decimal? TowCost { get; set; }
|
||||||
|
public decimal? VehicleDecimalGradeCode { get; set; }
|
||||||
|
public decimal? VehicleGrade { get; set; }
|
||||||
|
public decimal? MMRNationalAdjustedPrice { get; set; }
|
||||||
|
public decimal? MMRRegionalAdjustedPrice { get; set; }
|
||||||
|
public string MMR { get; set; }
|
||||||
|
public string ConditionReportLink { get; set; }
|
||||||
|
public string CollateralImagePath { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class Letter
|
||||||
|
{
|
||||||
|
public string ActionCode { get; set; }
|
||||||
|
|
||||||
|
// This is the eventual "This works and the code was written well" solution.
|
||||||
|
// Once letter codes are in place and agreed upon the alerts can be switched from ActionCode to LetterCode
|
||||||
|
public string? LetterCode { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public int? DaysToWait { get; set; }
|
||||||
|
public string WhenLetterIsSent { get; set; }
|
||||||
|
|
||||||
|
// This is currently used to match up descriptions from Temenos history/comments. Used to find if a specific
|
||||||
|
// ActionCode/LetterCode was sent.
|
||||||
|
public string LetterDescription { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public enum OwnershipType
|
||||||
|
{
|
||||||
|
Other = 1,
|
||||||
|
Coborrower = 3,
|
||||||
|
Borrower = 6
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Producer;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class ProcessingReceipt
|
||||||
|
{
|
||||||
|
public ProcessingReceipt(string accountNo)
|
||||||
|
{
|
||||||
|
AccountNo = accountNo;
|
||||||
|
AccountId = "";
|
||||||
|
QueuedBy = "Unknown";
|
||||||
|
Message = "";
|
||||||
|
Outcome = RepoProcessingResult.Error;
|
||||||
|
Processed = DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string AccountNo { get; protected set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string AccountId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string CaseId { get; set; }
|
||||||
|
[Required]
|
||||||
|
[MaxLength(40)]
|
||||||
|
public string QueuedBy { get; set; }
|
||||||
|
public RepoProcessingResult Outcome { get; set; }
|
||||||
|
public string Message { get; set; }
|
||||||
|
public DateTime Processed { get; set; }
|
||||||
|
|
||||||
|
public string Pretty()
|
||||||
|
{
|
||||||
|
return $"Key: {AccountNo}|{AccountId}|{CaseId}|{QueuedBy} -> {Outcome} : {Message}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Producer
|
||||||
|
{
|
||||||
|
public class ProcessingItem
|
||||||
|
{
|
||||||
|
public string AccountNo { get; set; }
|
||||||
|
|
||||||
|
public string AccountId { get; set; }
|
||||||
|
public string CaseId { get; set; }
|
||||||
|
public string QueuedBy { get; set; }
|
||||||
|
public string DetermineAuditItemKey()
|
||||||
|
{
|
||||||
|
return AccountNo + ":" + CaseId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Producer
|
||||||
|
{
|
||||||
|
public enum RepoProcessingResult
|
||||||
|
{
|
||||||
|
Autoclosed,
|
||||||
|
Unconverted,
|
||||||
|
Created,
|
||||||
|
Updated,
|
||||||
|
Ineligible,
|
||||||
|
MissingRequirement,
|
||||||
|
Error
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class RefundStatus
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int? RepoId { get; set; }
|
||||||
|
public string? WarrantyRefundStatus { get; set; }
|
||||||
|
public string? InsuranceRefundStatus { get; set; }
|
||||||
|
public string? PremiumDefiRefundStatus { get; set; }
|
||||||
|
public string? CPIRefundStatus { get; set; }
|
||||||
|
public DateTime? RefundsReceivedDate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Consumer;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class RepoAccount
|
||||||
|
{
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string AccountNo { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Status { get; set; }
|
||||||
|
public long MemberNo { get; set; }
|
||||||
|
public long LoanNo { get; set; }
|
||||||
|
public string AccountTypeCode { get; set; }
|
||||||
|
public string OrigAccountTypeCode { get; set; }
|
||||||
|
public int? Branch { get; set; }
|
||||||
|
public string Collector { get; set; }
|
||||||
|
public decimal? Balance { get; set; }
|
||||||
|
public DateTime? DueToPayDate { get; set; }
|
||||||
|
public DateTime? O4RDate { get; set; }
|
||||||
|
public DateTime? DateFirstDelinquent { get; set; }
|
||||||
|
public decimal? DelinquentAmount { get; set; }
|
||||||
|
public int? DaysDelinquent { get; set; }
|
||||||
|
public decimal? PaidSkipAmount { get; set; }
|
||||||
|
public string SubStatus { get; set; }
|
||||||
|
public decimal? RequiredPaymentAmount { get; set; }
|
||||||
|
public decimal? CurrentDelinquentAmount { get; set; }
|
||||||
|
public decimal? LstPmtAmt { get; set; }
|
||||||
|
public decimal? OrigAmount { get; set; }
|
||||||
|
public DateTime? LastPaymentDate { get; set; }
|
||||||
|
public DateTime? DateFirstIntellect { get; set; }
|
||||||
|
public string PrimaryIndividualId { get; set; }
|
||||||
|
public string Bankruptcy { get; set; }
|
||||||
|
public DateTime? ManualRedemptionDate { get; set; }
|
||||||
|
public DateTime? RedemptionExpiredDate { get; set; }
|
||||||
|
public ICollection<Borrower> Borrowers { get; set; }
|
||||||
|
public ICollection<Collateral> Collaterals { get; set; }
|
||||||
|
public ICollection<RepoStatusChange> RepoStatusChanges { get; set; }
|
||||||
|
[ForeignKey("RepoId")]
|
||||||
|
public RefundStatus RefundStatus { get; set; }
|
||||||
|
public DateTime? DateClosed { get; set; }
|
||||||
|
// This should reference
|
||||||
|
// a CaseId for Temenos.
|
||||||
|
public int? ReferenceId { get; set; }
|
||||||
|
public int? ReferenceCaseId { get; set; }
|
||||||
|
// This is the "Account Status" from Temenos so we can "Watch" it.
|
||||||
|
public string ReferenceStatus { get; set; }
|
||||||
|
public DateTime? AccountLastProcessed { get; set; }
|
||||||
|
public DateTime? WrittenOffDate { get; set; }
|
||||||
|
public int? SixtyPlusCollectorId { get; set; }
|
||||||
|
[ForeignKey("SixtyPlusCollectorId")]
|
||||||
|
public SixtyPlusCollector SixtyPlusCollector { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class RepoCompany
|
||||||
|
{
|
||||||
|
public int ID { get; set; }
|
||||||
|
|
||||||
|
public int? ReferenceId { get; set; }
|
||||||
|
public string Name { get; set; }
|
||||||
|
public string? Email { get; set; }
|
||||||
|
public string? Address_Line_1 { get; set; }
|
||||||
|
public string? Address_Line_2 { get; set; }
|
||||||
|
public string? City { get; set; }
|
||||||
|
public string? State { get; set; }
|
||||||
|
public string? ZIP { get; set; }
|
||||||
|
public string? Country { get; set; }
|
||||||
|
public string? Phone { get; set; }
|
||||||
|
public string? Fax { get; set; }
|
||||||
|
public string? DisabledBy { get; set; }
|
||||||
|
public DateTime? DisabledDate { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using LCU.API.Collections.CollectionsApiLib.Models;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class RepoCompanySelection : IValidatableObject
|
||||||
|
{
|
||||||
|
public int? Id { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public int? CollateralId { get; set; }
|
||||||
|
|
||||||
|
public RepoType RepoType { get; set; }
|
||||||
|
|
||||||
|
public int? RepoCompanyId { get; set; }
|
||||||
|
|
||||||
|
public DateTime? RepoCompanyAssignmentDate { get; set; }
|
||||||
|
|
||||||
|
public DateTime? DateRepoed { get; set; }
|
||||||
|
|
||||||
|
public DateTime? DateTimeCreated { get; set; }
|
||||||
|
|
||||||
|
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
|
||||||
|
{
|
||||||
|
var failedValidations = new List<ValidationResult>();
|
||||||
|
|
||||||
|
// This cannot be a required field on account of it resulting in a SQL error
|
||||||
|
if (RepoType == null)
|
||||||
|
{
|
||||||
|
failedValidations.Add(new ValidationResult("Repo Company Selection: The RepoType cannot be blank"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RepoCompanyAssignmentDate > DateRepoed)
|
||||||
|
{
|
||||||
|
failedValidations.Add(new ValidationResult("Repo Company Selection: The date repoed cannot come before the date assigned."));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RepoCompanyId != null && RepoCompanyAssignmentDate == null)
|
||||||
|
{
|
||||||
|
failedValidations.Add(new ValidationResult("Repo Company Selection: The Repo Company Assignment date cannot be null when a Repo Company is set."));
|
||||||
|
}
|
||||||
|
|
||||||
|
return failedValidations;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class RepoLetter
|
||||||
|
{
|
||||||
|
public string NoticeType { get; set; }
|
||||||
|
public DateTime DateSent { get; set; }
|
||||||
|
public DateTime DateExpired { get; set; }
|
||||||
|
public int DaysToRedeem { get; set; }
|
||||||
|
public string ActionCode { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class RepoManualStatus
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
[Required]
|
||||||
|
public bool IsActiveStatus { get; set; }
|
||||||
|
[Required]
|
||||||
|
public bool WatchForStatusChanges { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
using System;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class RepoStatusChange
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
public int Id { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string StatusFrom { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string StatusTo { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string ChangedBy { get; set; }
|
||||||
|
[Required]
|
||||||
|
public DateTime ChangedDate { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("RepoId")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public RepoAccount RepoAccount { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+47
@@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Reporting
|
||||||
|
{
|
||||||
|
public class LandmarkReportAccountEntry
|
||||||
|
{
|
||||||
|
// Repo
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
public string AccountNo { get; set; }
|
||||||
|
public decimal? Balance { get; set; }
|
||||||
|
public int? DaysDelinquent { get; set; }
|
||||||
|
public DateTime? LastPaymentDate { get; set; }
|
||||||
|
public decimal? LastPaymentAmount { get; set; }
|
||||||
|
public string AccountTypeCode { get; set; }
|
||||||
|
public string Bankruptcy { get; set; }
|
||||||
|
public decimal? DelinquentAmount { get; set; }
|
||||||
|
public string Collector { get; set; }
|
||||||
|
public DateTime? DateClosed { get; set; }
|
||||||
|
// Borrower
|
||||||
|
public string IndividualName { get; set; }
|
||||||
|
// Collateral
|
||||||
|
public string Make { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
public int? Year { get; set; }
|
||||||
|
// RepoCompanySelection
|
||||||
|
public string RepoCompany { get; set; }
|
||||||
|
public DateTime? DateRepoed { get; set; }
|
||||||
|
public string RepoType { get; set; }
|
||||||
|
public DateTime? DateAssigned { get; set; }
|
||||||
|
// RepoStatusChange
|
||||||
|
public string Status { get; set; }
|
||||||
|
public int? DaysInStatus { get; set; }
|
||||||
|
// IMSAutoFile Data
|
||||||
|
public DateTime? SoldDate { get; set; }
|
||||||
|
public DateTime? DateEnteredAutoIMS { get; set; }
|
||||||
|
public DateTime? ScheduledSaleDate { get; set; }
|
||||||
|
public decimal? FloorPrice { get; set; }
|
||||||
|
public decimal? Grade { get; set; }
|
||||||
|
// Auction and AuctionAssignments
|
||||||
|
public string AuctionHouse { get; set; }
|
||||||
|
public DateTime? AuctionDate { get; set; }
|
||||||
|
public decimal? TotalCharges { get; set; }
|
||||||
|
public decimal? GrossPercentFloor { get; set; }
|
||||||
|
public decimal? NetPercentFloor { get; set; }
|
||||||
|
public decimal? GrossSalePrice { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+10
@@ -0,0 +1,10 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Reporting.Responses
|
||||||
|
{
|
||||||
|
public class DataTable
|
||||||
|
{
|
||||||
|
public string[] Headers { get; set; }
|
||||||
|
public IEnumerable<RepoAccountReferenceRow> Rows { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Reporting.Responses
|
||||||
|
{
|
||||||
|
public class RepoAccountReferenceRow
|
||||||
|
{
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
public ReportCell[] Cells { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Reporting.Responses
|
||||||
|
{
|
||||||
|
public class ReportCell
|
||||||
|
{
|
||||||
|
public string Display { get; set; }
|
||||||
|
public object Value { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Reporting.Responses
|
||||||
|
{
|
||||||
|
public class ReportTable
|
||||||
|
{
|
||||||
|
public string[] Headers { get; set; }
|
||||||
|
public ReportCell[,] Cells { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+8
@@ -0,0 +1,8 @@
|
|||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Reporting.Responses
|
||||||
|
{
|
||||||
|
public class ReportTableResponse
|
||||||
|
{
|
||||||
|
public ReportTable ReportTable { get; set; }
|
||||||
|
public DataTable DataTable { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+53
@@ -0,0 +1,53 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Reporting
|
||||||
|
{
|
||||||
|
public class StdReportEntry
|
||||||
|
{
|
||||||
|
// Repo
|
||||||
|
public int RepoId { get; set; }
|
||||||
|
public string AccountNo { get; set; }
|
||||||
|
public string AccountTypeCode { get; set; }
|
||||||
|
public decimal Balance { get; set; }
|
||||||
|
public string Status { get; set; }
|
||||||
|
public int DaysInStatus { get; set; }
|
||||||
|
public string Bankruptcy { get; set; }
|
||||||
|
public string Collector { get; set; }
|
||||||
|
public int? DaysCurrentDelq { get; set; }
|
||||||
|
public int? DaysDelqWhenAdded { get; set; }
|
||||||
|
public decimal? DelinquentAmount { get; set; }
|
||||||
|
public decimal? LastPaymentAmount { get; set; }
|
||||||
|
public DateTime? LastPaymentDate { get; set; }
|
||||||
|
public string FilteredStatus { get; set; }
|
||||||
|
public DateTime? FilteredStatusChangeDate { get; set; }
|
||||||
|
public DateTime? O4RDate { get; set; }
|
||||||
|
// Auction Assignment
|
||||||
|
public string AuctionId { get; set; }
|
||||||
|
public string AuctionName { get; set; }
|
||||||
|
// Collateral
|
||||||
|
public int CollateralId { get; set; }
|
||||||
|
public int? RepoCompanyId { get; set; }
|
||||||
|
public string RepoCompany { get; set; }
|
||||||
|
public string RepoType { get; set; }
|
||||||
|
public DateTime? RepoCompanyAssignmentDate { get; set; }
|
||||||
|
public DateTime? DateRepoed { get; set; }
|
||||||
|
public int? RepoDuration { get; set; }
|
||||||
|
public int? Year { get; set; }
|
||||||
|
public string Make { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
// IMSAutoFile Data
|
||||||
|
public string AutoImsStatus { get; set; }
|
||||||
|
public DateTime? SoldDate { get; set; }
|
||||||
|
public DateTime? DateEnteredAutoIMS { get; set; }
|
||||||
|
public DateTime? ScheduledSaleDate { get; set; }
|
||||||
|
public decimal? GrossPercentFloor { get; set; }
|
||||||
|
public decimal? NetPercentFloor { get; set; }
|
||||||
|
public decimal? TotalCharges { get; set; }
|
||||||
|
public decimal? Grade { get; set; }
|
||||||
|
public decimal? FloorPrice { get; set; }
|
||||||
|
public decimal? GrossSalePrice { get; set; }
|
||||||
|
// Borrower
|
||||||
|
public string IndividualName { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Results
|
||||||
|
{
|
||||||
|
public class AuctionData
|
||||||
|
{
|
||||||
|
public int LowAuction { get; set; }
|
||||||
|
public int AvgAuction { get; set; }
|
||||||
|
public int HighAuction { get; set; }
|
||||||
|
public string DateRange { get; set; }
|
||||||
|
public object AuctionAccessories { get; set; }
|
||||||
|
public string AcceptableMileage { get; set; }
|
||||||
|
public string RatePerMile { get; set; }
|
||||||
|
public string MileageAdjust { get; set; }
|
||||||
|
public string MinAuctionValue { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Results
|
||||||
|
{
|
||||||
|
public class AuctionInformation
|
||||||
|
{
|
||||||
|
public string RequestId { get; set; }
|
||||||
|
public List<AuctionData> Result { get; set; }
|
||||||
|
public string Userinfo { get; set; }
|
||||||
|
public string Error { get; set; }
|
||||||
|
public string AuthId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Results
|
||||||
|
{
|
||||||
|
public class PagedResult<T> where T : class
|
||||||
|
{
|
||||||
|
public IEnumerable<T> Items { get; set; }
|
||||||
|
public int Total { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Results
|
||||||
|
{
|
||||||
|
public class VehicleData
|
||||||
|
{
|
||||||
|
public int Modelyear { get; set; }
|
||||||
|
public string Make { get; set; }
|
||||||
|
public string Model { get; set; }
|
||||||
|
public string Body { get; set; }
|
||||||
|
public int Ucgvehicleid { get; set; }
|
||||||
|
public string Vehicletype { get; set; }
|
||||||
|
public string Mileageclass { get; set; }
|
||||||
|
public string Basemsrp { get; set; }
|
||||||
|
public string Bodytype { get; set; }
|
||||||
|
public string Doors { get; set; }
|
||||||
|
public string Trim { get; set; }
|
||||||
|
public string Trim2 { get; set; }
|
||||||
|
public string Drivetype { get; set; }
|
||||||
|
public string Liters { get; set; }
|
||||||
|
public string Engineconfiguration { get; set; }
|
||||||
|
public string Cylinders { get; set; }
|
||||||
|
public string Inductiontype { get; set; }
|
||||||
|
public string Transmission { get; set; }
|
||||||
|
public string Fueltype { get; set; }
|
||||||
|
public string Wheels { get; set; }
|
||||||
|
public string Curbweight { get; set; }
|
||||||
|
public string Gvw { get; set; }
|
||||||
|
public string Gcw { get; set; }
|
||||||
|
public string Ucgsubsegment { get; set; }
|
||||||
|
public string Modelnumber { get; set; }
|
||||||
|
public int Rollupvehicleid { get; set; }
|
||||||
|
public int Basecleantrade { get; set; }
|
||||||
|
public int Baseaveragetrade { get; set; }
|
||||||
|
public int Baseroughtrade { get; set; }
|
||||||
|
public int Basecleanretail { get; set; }
|
||||||
|
public int Baseloan { get; set; }
|
||||||
|
public int Averagemileage { get; set; }
|
||||||
|
public int Mileageadjustment { get; set; }
|
||||||
|
public int Vinoptionstrade { get; set; }
|
||||||
|
public int Vinoptionsretail { get; set; }
|
||||||
|
public int Vinoptionsloan { get; set; }
|
||||||
|
public int Adjustedcleantrade { get; set; }
|
||||||
|
public int Adjustedaveragetrade { get; set; }
|
||||||
|
public int Adjustedroughtrade { get; set; }
|
||||||
|
public int Adjustedcleanretail { get; set; }
|
||||||
|
public int Adjustedloan { get; set; }
|
||||||
|
public int Maxmileageadj { get; set; }
|
||||||
|
public int Minmileageadj { get; set; }
|
||||||
|
public int Minadjretail { get; set; }
|
||||||
|
public int Minadjcleantrade { get; set; }
|
||||||
|
public int Minadjaveragetrade { get; set; }
|
||||||
|
public int Minadjroughtrade { get; set; }
|
||||||
|
public int Minadjloan { get; set; }
|
||||||
|
public int Minadjretailforloan { get; set; }
|
||||||
|
public int Vid { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+13
@@ -0,0 +1,13 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Results
|
||||||
|
{
|
||||||
|
public class VehicleInformation
|
||||||
|
{
|
||||||
|
public string RequestId { get; set; }
|
||||||
|
public List<VehicleData> Result { get; set; }
|
||||||
|
public string Userinfo { get; set; }
|
||||||
|
private string AdjustedMileage { get; set; }
|
||||||
|
private string AuthId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class SavedLocation
|
||||||
|
{
|
||||||
|
public int ID { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public int? LocationType { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string Address_Line_1 { get; set; }
|
||||||
|
|
||||||
|
public string Address_Line_2 { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string City { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string State { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
public string ZIP { get; set; }
|
||||||
|
|
||||||
|
public string Country { get; set; }
|
||||||
|
|
||||||
|
public string Phone { get; set; }
|
||||||
|
|
||||||
|
public string Fax { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+23
@@ -0,0 +1,23 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class AccountType
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string AccountTypeCode { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
[Required]
|
||||||
|
public bool IsVisible { get; set; }
|
||||||
|
public int? CategoryId { get; set; }
|
||||||
|
|
||||||
|
[ForeignKey("ID")]
|
||||||
|
[JsonIgnore]
|
||||||
|
public LoanCategory LoanCategories { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class AllowedStatusChange
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string CurrentStatus { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string AllowedChangeStatus { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class BodyStyle
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public string Code { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class BranchEntry
|
||||||
|
{
|
||||||
|
public string BranchId { get; set; }
|
||||||
|
public string BranchName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class CleaningLevel
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Code { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class CleaningLevelCodes_NN
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Code { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class CodeDescriptionPairs
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Code { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class CollateralType
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string LookupHandler { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class CollateralTypeToVehicleType
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int CollateralTypeId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public int VehicleTypeId { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class HoldStatus
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Code { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class LoanCategory
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int ID { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string CategoryName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class LocationType
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Code { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class Settings
|
||||||
|
{
|
||||||
|
public IEnumerable<AccountType> AccountTypes { get; set; }
|
||||||
|
public IEnumerable<AllowedStatusChange> AllowedStatusChanges { get; set; }
|
||||||
|
public IEnumerable<BodyStyle> BodyStyles { get; set; }
|
||||||
|
public IEnumerable<CleaningLevel> CleaningLevels { get; set; }
|
||||||
|
public IEnumerable<CollateralType> CollateralTypes { get; set; }
|
||||||
|
public IEnumerable<CollateralTypeToVehicleType> CollateralTypesToVehicleTypes { get; set; }
|
||||||
|
public IEnumerable<HoldStatus> HoldStatuses { get; set; }
|
||||||
|
public IEnumerable<LoanCategory> LoanCategories { get; set; }
|
||||||
|
public IEnumerable<LocationType> LocationTypes { get; set; }
|
||||||
|
public IEnumerable<VehicleType> VehicleTypes { get; set; }
|
||||||
|
public IEnumerable<BranchEntry> BranchSet { get; set; }
|
||||||
|
public IReadOnlyCollection<ExternalUser> ExternalUsers { get; set; }
|
||||||
|
public IReadOnlyCollection<RepoCompany> RepoCompanies { get; set; }
|
||||||
|
public IReadOnlyCollection<string> TransactionTypeCodes { get; set; }
|
||||||
|
public string TransactionTypeCodeQueryPrefix { get; set; }
|
||||||
|
public string TransactionHistoryParameterDateFormat { get; set; }
|
||||||
|
public int TransactionHistoryStartDateOffset { get; set; }
|
||||||
|
public IReadOnlyDictionary<int, string> RepoTypeMap { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+12
@@ -0,0 +1,12 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models.Settings
|
||||||
|
{
|
||||||
|
public class VehicleType
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public string Code { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string Description { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class SixtyPlusCollector
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int SixtyPlusCollectorId { get; set; }
|
||||||
|
[Required]
|
||||||
|
public string SixtyPlusCollectorName { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Models
|
||||||
|
{
|
||||||
|
public class VehicleFloorPricingParameters
|
||||||
|
{
|
||||||
|
[Required]
|
||||||
|
public int Id { get; set; }
|
||||||
|
public decimal LowCondition { get; set; }
|
||||||
|
public decimal HighCondition { get; set; }
|
||||||
|
public string NADAFirstValue { get; set; }
|
||||||
|
public string NADASecondValue { get; set; }
|
||||||
|
public string MMRAdjustedValue { get; set; }
|
||||||
|
public decimal PercentageOf { get; set; }
|
||||||
|
public int ValuationServiceType { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,412 @@
|
|||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Settings;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Collections.CollectionsApiLib.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Producer;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Reporting;
|
||||||
|
using System.Data.Entity.Infrastructure;
|
||||||
|
using LCU.Library.Internal.RepoApiModels.Models;
|
||||||
|
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Persistence
|
||||||
|
{
|
||||||
|
public class AppDbContext : DbContext
|
||||||
|
{
|
||||||
|
public DbSet<AccountType> AccountTypeCodes { get; set; }
|
||||||
|
public DbSet<AllowedStatusChange> AllowedStatusChanges { get; set; }
|
||||||
|
public DbSet<AuctionHouse> Auctions { get; set; }
|
||||||
|
public DbSet<AuctionAssignment> AuctionAssignments { get; set; }
|
||||||
|
public DbSet<AuctionAssignmentNote> AuctionAssignmentNotes { get; set; }
|
||||||
|
public DbSet<AuditRecord> AuditRecords { get; set; }
|
||||||
|
public DbSet<BodyStyle> BodyStyleCodes { get; set; }
|
||||||
|
public DbSet<Borrower> Borrowers { get; set; }
|
||||||
|
public DbSet<CleaningLevel> CleaningLevelCodes { get; set; }
|
||||||
|
public DbSet<Collateral> Collaterals { get; set; }
|
||||||
|
public DbSet<CollateralType> CollateralTypes { get; set; }
|
||||||
|
public DbSet<CollateralTypeToVehicleType> CollateralTypesToVehicleTypes { get; set; }
|
||||||
|
public DbSet<EventAlert> EventAlerts { get; set; }
|
||||||
|
public DbSet<FloorPriceValuesUsed> FloorPriceValuesUsed { get; set; }
|
||||||
|
public DbSet<HoldStatus> HoldStatusCodes { get; set; }
|
||||||
|
public DbSet<ImsAutoFileData> ImsAutoFileData { get; set; }
|
||||||
|
public DbSet<Letter> Letters { get; set; }
|
||||||
|
public DbSet<LoanCategory> LoanCategories { get; set; }
|
||||||
|
public DbSet<LocationType> LocationTypeCodes { get; set; }
|
||||||
|
public DbSet<ProcessingReceipt> ProcessingReceipts { get; set; }
|
||||||
|
public DbSet<RepoAccount> RepoAccounts { get; set; }
|
||||||
|
public DbSet<RepoCompany> RepoCompanies { get; set; }
|
||||||
|
public DbSet<RepoManualStatus> RepoManualStatuses { get; set; }
|
||||||
|
public DbSet<RepoStatusChange> RepoStatusChanges { get; set; }
|
||||||
|
public DbSet<VehicleType> VehicleTypeCodes { get; set; }
|
||||||
|
public DbSet<VehicleFloorPricingParameters> VehicleFloorPricingParameters { get; set; }
|
||||||
|
public DbSet<RefundStatus> RefundStatuses { get; set; }
|
||||||
|
public DbSet<AuctionAssignmentToCollateral> AuctionAssignmentToCollaterals { get; set; }
|
||||||
|
public DbSet<RepoCompanySelection> RepoCompanySelections { get; set; }
|
||||||
|
public DbSet<SavedLocation> SavedLocations { get; set; }
|
||||||
|
|
||||||
|
public DbSet<ExternalUser> ExternalUsers { get; set; }
|
||||||
|
public DbSet<SixtyPlusCollector> SixtyPLusCollectors { get; set; }
|
||||||
|
|
||||||
|
public DbSet<RepoSyncRunInfo> RepoSyncRunInfo { get; set; }
|
||||||
|
public DbSet<RepoSyncBatch> RepoSyncBatch { get; set; }
|
||||||
|
|
||||||
|
// Queries for Reporting / etc
|
||||||
|
//TODO REMOVING FOR testing
|
||||||
|
//public DbQuery<StdReportEntry> StandardReportEntries { get; set; }
|
||||||
|
//public DbQuery<LandmarkReportAccountEntry> ActiveAccountEntries { get; set; }
|
||||||
|
|
||||||
|
public AppDbContext(DbContextOptions<AppDbContext> options) : base(options)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder builder)
|
||||||
|
{
|
||||||
|
base.OnModelCreating(builder);
|
||||||
|
|
||||||
|
builder.Entity<EventAlert>().ToTable("EventAlert");
|
||||||
|
builder.Entity<EventAlert>().HasKey(p => p.Id);
|
||||||
|
builder.Entity<EventAlert>().Property(p => p.Id).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<EventAlert>().Property(p => p.AccountNo).IsRequired();
|
||||||
|
builder.Entity<EventAlert>().Property(p => p.DateAdded).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<EventAlert>().Property(p => p.CreatedBy).IsRequired().HasMaxLength(25);
|
||||||
|
builder.Entity<EventAlert>().Property(p => p.Message).IsRequired();
|
||||||
|
builder.Entity<EventAlert>().Property(p => p.EmailRecipient);
|
||||||
|
builder.Entity<EventAlert>().Property(p => p.EmailBody);
|
||||||
|
|
||||||
|
builder.Entity<Borrower>().ToTable("Borrowers");
|
||||||
|
builder.Entity<Borrower>().HasKey(p => new { p.RepoId, p.IndividualId });
|
||||||
|
builder.Entity<Borrower>().Property(p => p.IndividualName).IsRequired();
|
||||||
|
builder.Entity<Borrower>().Property(p => p.OwnershipType).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<ProcessingReceipt>().ToTable("ProcessingReceipt");
|
||||||
|
builder.Entity<ProcessingReceipt>().HasKey(p => new { p.AccountNo, p.AccountId, p.CaseId });
|
||||||
|
builder.Entity<ProcessingReceipt>().Property(p => p.AccountId);
|
||||||
|
builder.Entity<ProcessingReceipt>().Property(p => p.CaseId);
|
||||||
|
builder.Entity<ProcessingReceipt>().Property(p => p.QueuedBy);
|
||||||
|
builder.Entity<ProcessingReceipt>().Property(p => p.Message);
|
||||||
|
//TODO: DO this for repocompanyselection repo type
|
||||||
|
builder.Entity<ProcessingReceipt>().Property(p => p.Outcome)
|
||||||
|
.HasConversion(x => x.ToString(),
|
||||||
|
x => (RepoProcessingResult)Enum.Parse(typeof(RepoProcessingResult), x));
|
||||||
|
builder.Entity<ProcessingReceipt>().Property(p => p.Processed);
|
||||||
|
|
||||||
|
builder.Entity<RepoAccount>().ToTable("Repos");
|
||||||
|
builder.Entity<RepoAccount>().HasKey(p => p.RepoId);
|
||||||
|
builder.Entity<RepoAccount>().Property(p => p.RepoId).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<RepoAccount>().Property(p => p.AccountNo).IsRequired();
|
||||||
|
builder.Entity<RepoAccount>().Property(p => p.Status).IsRequired();
|
||||||
|
builder.Entity<RepoAccount>().Property(p => p.SubStatus);
|
||||||
|
builder.Entity<RepoAccount>().HasMany(p => p.Borrowers);
|
||||||
|
builder.Entity<RepoAccount>().HasMany(p => p.Collaterals);
|
||||||
|
builder.Entity<RepoAccount>().HasMany(p => p.RepoStatusChanges);
|
||||||
|
builder.Entity<RepoAccount>().HasOne(p => p.RefundStatus).WithOne().IsRequired(false);
|
||||||
|
builder.Entity<RepoAccount>().Property(p => p.RedemptionExpiredDate);
|
||||||
|
builder.Entity<RepoAccount>().HasOne(p => p.SixtyPlusCollector);
|
||||||
|
|
||||||
|
builder.Entity<RepoStatusChange>().ToTable("RepoStatusChanges");
|
||||||
|
builder.Entity<RepoStatusChange>().HasKey(p => new { p.RepoId, p.Id });
|
||||||
|
builder.Entity<RepoStatusChange>().Property(p => p.RepoId).IsRequired();
|
||||||
|
builder.Entity<RepoStatusChange>().Property(p => p.StatusFrom).IsRequired();
|
||||||
|
builder.Entity<RepoStatusChange>().Property(p => p.StatusTo).IsRequired();
|
||||||
|
builder.Entity<RepoStatusChange>().Property(p => p.ChangedBy).IsRequired();
|
||||||
|
builder.Entity<RepoStatusChange>().Property(p => p.ChangedDate).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
|
||||||
|
builder.Entity<AuditRecord>().ToTable("AuditTable");
|
||||||
|
builder.Entity<AuditRecord>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<AuditRecord>().Property(p => p.DatePerformed).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<AuditRecord>().Property(p => p.Description).IsRequired();
|
||||||
|
builder.Entity<AuditRecord>().Property(p => p.Action).IsRequired();
|
||||||
|
builder.Entity<AuditRecord>().Property(p => p.ClassName).IsRequired();
|
||||||
|
builder.Entity<AuditRecord>().Property(p => p.PerformedBy).IsRequired();
|
||||||
|
builder.Entity<AuditRecord>().Property(p => p.KeyRepresentation).IsRequired();
|
||||||
|
builder.Entity<AuditRecord>().Property(p => p.PropertyValues);
|
||||||
|
|
||||||
|
builder.Entity<Collateral>().ToTable("Collaterals");
|
||||||
|
builder.Entity<Collateral>().HasKey(p => p.CollateralId);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.CollateralId).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<Collateral>().Property(p => p.RepoId).IsRequired();
|
||||||
|
builder.Entity<Collateral>().Property(p => p.Vin);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.Make);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.Model);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.Year);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.Description);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.VehicleType);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.BodyStyle);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.Inoperable);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.CollateralTypeId);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.RetitledInLandmarkName);
|
||||||
|
builder.Entity<Collateral>().Property(p => p.RefCollateralId);
|
||||||
|
builder.Entity<Collateral>().HasMany(p => p.AuctionAssignmentToCollaterals);
|
||||||
|
builder.Entity<Collateral>().HasMany(p => p.RepoCompanySelections);
|
||||||
|
|
||||||
|
builder.Entity<RepoManualStatus>().ToTable("RepoManualStatus");
|
||||||
|
builder.Entity<RepoManualStatus>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<RepoManualStatus>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<RepoManualStatus>().Property(p => p.Description).IsRequired();
|
||||||
|
builder.Entity<RepoManualStatus>().Property(p => p.IsActiveStatus).IsRequired();
|
||||||
|
builder.Entity<RepoManualStatus>().Property(p => p.WatchForStatusChanges).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<AccountType>().ToTable("AccountTypeCodes");
|
||||||
|
builder.Entity<AccountType>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<AccountType>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<AccountType>().Property(p => p.Description).IsRequired();
|
||||||
|
builder.Entity<AccountType>().Property(p => p.IsVisible).IsRequired();
|
||||||
|
builder.Entity<AccountType>().Property(p => p.CategoryId);
|
||||||
|
|
||||||
|
builder.Entity<AllowedStatusChange>().ToTable("AllowedStatusChanges");
|
||||||
|
builder.Entity<AllowedStatusChange>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<AllowedStatusChange>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<AllowedStatusChange>().Property(p => p.CurrentStatus).IsRequired();
|
||||||
|
builder.Entity<AllowedStatusChange>().Property(p => p.AllowedChangeStatus).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<BodyStyle>().ToTable("BodyStyleCodes");
|
||||||
|
builder.Entity<BodyStyle>().HasKey(p => p.Code);
|
||||||
|
builder.Entity<BodyStyle>().Property(p => p.Code).IsRequired();
|
||||||
|
builder.Entity<BodyStyle>().Property(p => p.Description).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<CleaningLevel>().ToTable("CleaningLevelCodes");
|
||||||
|
builder.Entity<CleaningLevel>().HasKey(p => p.Code);
|
||||||
|
builder.Entity<CleaningLevel>().Property(p => p.Code).IsRequired();
|
||||||
|
builder.Entity<CleaningLevel>().Property(p => p.Description).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<CollateralType>().ToTable("CollateralTypes");
|
||||||
|
builder.Entity<CollateralType>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<CollateralType>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<CollateralType>().Property(p => p.Description).IsRequired();
|
||||||
|
builder.Entity<CollateralType>().Property(p => p.LookupHandler).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<HoldStatus>().ToTable("HoldStatusCodes");
|
||||||
|
builder.Entity<HoldStatus>().HasKey(p => p.Code);
|
||||||
|
builder.Entity<HoldStatus>().Property(p => p.Code).IsRequired();
|
||||||
|
builder.Entity<HoldStatus>().Property(p => p.Description).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<LoanCategory>().ToTable("LoanCategories");
|
||||||
|
builder.Entity<LoanCategory>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<LoanCategory>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<LoanCategory>().Property(p => p.CategoryName).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<LocationType>().ToTable("LocationTypeCodes");
|
||||||
|
builder.Entity<LocationType>().HasKey(p => p.Code);
|
||||||
|
builder.Entity<LocationType>().Property(p => p.Code).IsRequired();
|
||||||
|
builder.Entity<LocationType>().Property(p => p.Description).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<VehicleType>().ToTable("VehicleTypeCodes");
|
||||||
|
builder.Entity<VehicleType>().HasKey(p => p.Code);
|
||||||
|
builder.Entity<VehicleType>().Property(p => p.Code).IsRequired();
|
||||||
|
builder.Entity<VehicleType>().Property(p => p.Description).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<CollateralTypeToVehicleType>().ToTable("CollateralTypesToVehicleTypes");
|
||||||
|
builder.Entity<CollateralTypeToVehicleType>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<CollateralTypeToVehicleType>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<CollateralTypeToVehicleType>().Property(p => p.VehicleTypeId).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().ToTable("VehicleFloorPricingParameters");
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().HasKey(p => p.Id);
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.Id).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.LowCondition).IsRequired();
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.HighCondition).IsRequired();
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.NADAFirstValue).IsRequired();
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.NADASecondValue).IsRequired();
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.MMRAdjustedValue).IsRequired();
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.PercentageOf).IsRequired();
|
||||||
|
builder.Entity<VehicleFloorPricingParameters>().Property(p => p.ValuationServiceType).IsRequired();
|
||||||
|
|
||||||
|
builder.Entity<Letter>().ToTable("Letters");
|
||||||
|
builder.Entity<Letter>().HasKey(p => p.ActionCode);
|
||||||
|
builder.Entity<Letter>().Property(p => p.Description).IsRequired();
|
||||||
|
builder.Entity<Letter>().Property(p => p.DaysToWait);
|
||||||
|
builder.Entity<Letter>().Property(p => p.WhenLetterIsSent);
|
||||||
|
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().ToTable("FloorPriceValuesUsed");
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().HasKey(p => new { p.AuctionAssignmentId, p.CollateralValuationId });
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.AuctionAssignmentId).IsRequired();
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.RepoId).IsRequired();
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.CollateralValuationId).IsRequired();
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.Condition);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.LowParam);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.HighParam);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.PercentageOf);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.AuctionGuideBookPrice);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.WasAuctionGuideBookPriceUsed);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.MMRNationalAdjustedPrice);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.MMRRegionalAdjustedPrice);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.WasMMRNationalAdjustedPriceUsed);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.WasMMRRegionalAdjustedPriceUsed);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.NADALowAdjustedAuctionValue);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.NADAAverageAdjustedAuctionValue);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.NADAHighAdjustedAuctionValue);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.WasNADALowAdjustedAuctionValueUsed);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.WasNADAAverageAdjustedAuctionValueUsed);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.WasNADAHighAdjustedAuctionValueUsed);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().Property(p => p.NADAMMRFloorPrice);
|
||||||
|
builder.Entity<FloorPriceValuesUsed>().HasOne(p => p.CollateralValuation);
|
||||||
|
|
||||||
|
// Only added code-referenced fields for below entities
|
||||||
|
builder.Entity<AuctionHouse>().ToTable("Auctions");
|
||||||
|
builder.Entity<AuctionHouse>().HasKey(p => p.AuctionID);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.AuctionID).IsRequired();
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Name);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Active);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Address_Line_1);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Address_Line_2);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.City);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Country);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Fax);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Latitude);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Longitude);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.Phone);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.State);
|
||||||
|
builder.Entity<AuctionHouse>().Property(p => p.ZIP);
|
||||||
|
|
||||||
|
builder.Entity<AuctionAssignment>().ToTable("AuctionAssignments");
|
||||||
|
builder.Entity<AuctionAssignment>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.AuctionId).IsRequired();
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.AuctionCustomerNo).IsRequired();
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.CollateralVIN);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.DateSubmitted);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.FloorPrice);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.FloorPriceResponseCode);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.FloorPriceResponseDescription);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.FloorPriceSubmissionErrors);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.HoldStatus);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.HoldUntil);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.RedeemedDate);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.VehicleType);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.BodyStyle);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.Inoperable);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.RetailValue);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.AuctionNotes);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.AvailablePickupDate);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.LegalSaleDate);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.CleaningLevel);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.SubmissionErrors);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.SubmissionResponseCode);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.SubmissionResponseDescription);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.SentTitleDocsDate);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.TitleSentResponseCode);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.TitleSentResponseDescription);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.TitleSentSubmissionErrors);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.AddedThroughRepoDatabase);
|
||||||
|
builder.Entity<AuctionAssignment>().Property(p => p.IsActive).HasDefaultValue(true);
|
||||||
|
builder.Entity<AuctionAssignment>().HasOne(p => p.AutoIMS);
|
||||||
|
builder.Entity<AuctionAssignment>().HasOne(p => p.Auction);
|
||||||
|
builder.Entity<AuctionAssignment>().HasMany(p => p.AuctionAssignmentToCollaterals);
|
||||||
|
builder.Entity<AuctionAssignment>().HasOne(p => p.FloorPriceValuesUsed);
|
||||||
|
|
||||||
|
builder.Entity<AuctionAssignmentNote>().ToTable("AuctionAssignmentNotes");
|
||||||
|
builder.Entity<AuctionAssignmentNote>().HasKey(p => p.Id);
|
||||||
|
builder.Entity<AuctionAssignmentNote>().Property(p => p.Id).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<AuctionAssignmentNote>().Property(p => p.AuctionAssignmentId).IsRequired();
|
||||||
|
builder.Entity<AuctionAssignmentNote>().Property(p => p.AuctionCustomerNo).IsRequired();
|
||||||
|
builder.Entity<AuctionAssignmentNote>().Property(p => p.DateWritten);
|
||||||
|
builder.Entity<AuctionAssignmentNote>().Property(p => p.Origin);
|
||||||
|
builder.Entity<AuctionAssignmentNote>().Property(p => p.Text);
|
||||||
|
builder.Entity<AuctionAssignmentNote>().Property(p => p.Type);
|
||||||
|
|
||||||
|
builder.Entity<ImsAutoFileData>().ToTable("ImsAutoFileData");
|
||||||
|
builder.Entity<ImsAutoFileData>().HasKey(p => new { p.VIN, p.RepoId });
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.RepoId).IsRequired();
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.AuctionCustomerNo).IsRequired();
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.VIN).IsRequired();
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.AssignmentAccepted);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.AuctionAssignmentId);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.DateReceivedFromAutoIMS);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.AnnouncedConditions);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ApprovedVehicleGrade);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ArbitrationReason);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.AsIs100KMiles);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.AuctionAge);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.AuctionGuideBookPrice);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.BuyerId);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.BuyerName);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ChargeAmount);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.CheckAmount);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ClientAge);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ClientCancelled);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.CollateralImagePath);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.CollisionDamage);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ConditionReportLink);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.DateEnteredAutoIMS);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.DatePickedUp);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.DateofLoss);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.DaysRun);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.DaysRunHighestBidRecordedbyAuction);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.DaystoDelivery);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.Description);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.FloorPriceAccepted);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.FundsSent);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.GrossPercentFloor);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.HighestBid);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.InspectedDate);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.IsDrivable);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.IsOperable);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.MMR);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.MMRNationalAdjustedPrice);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.MMRRegionalAdjustedPrice);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.NetPercentFloor);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.OTHERAdvancedOther);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.OTHERAdvancedStorage);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.OTHERAdvancedTow);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.OTHERMiscellaneous);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.OTHERTotal);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.OtherAdvanceFees);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ScheduledSaleDate);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.SoldDate);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.Status);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.SalePrice);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.ShipmentDate);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.StorageCost);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.StorageRatePerDay);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.StatedMileage);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TitleNumber);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TitleReceived);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TitleReturned);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TitleState);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TitleStatus);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TitleStatusfromAuction);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TotalCharges);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.TowCost);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.VehicleDecimalGradeCode);
|
||||||
|
builder.Entity<ImsAutoFileData>().Property(p => p.VehicleGrade);
|
||||||
|
|
||||||
|
builder.Entity<RepoCompany>().ToTable("RepoCompany");
|
||||||
|
builder.Entity<RepoCompany>().HasKey(p => p.ID);
|
||||||
|
builder.Entity<RepoCompany>().Property(p => p.ID).IsRequired().ValueGeneratedOnAdd();
|
||||||
|
builder.Entity<RepoCompany>().Property(p => p.Name);
|
||||||
|
builder.Entity<RepoCompany>().Property(p => p.Email);
|
||||||
|
|
||||||
|
builder.Entity<RefundStatus>().ToTable("RefundStatuses");
|
||||||
|
builder.Entity<RefundStatus>().HasKey(p => p.RepoId);
|
||||||
|
|
||||||
|
builder.Entity<AuctionAssignmentToCollateral>().ToTable("AuctionAssignmentsToCollaterals");
|
||||||
|
builder.Entity<AuctionAssignmentToCollateral>().HasKey(p => new { p.AuctionAssignmentId, p.CollateralId });
|
||||||
|
builder.Entity<AuctionAssignmentToCollateral>()
|
||||||
|
.HasOne(aa2c => aa2c.AuctionAssignment)
|
||||||
|
.WithMany(auctionAssignment => auctionAssignment.AuctionAssignmentToCollaterals)
|
||||||
|
.HasForeignKey(aa2c => aa2c.AuctionAssignmentId);
|
||||||
|
builder.Entity<AuctionAssignmentToCollateral>()
|
||||||
|
.HasOne(aa2c => aa2c.Collateral)
|
||||||
|
.WithMany(Collateral => Collateral.AuctionAssignmentToCollaterals)
|
||||||
|
.HasForeignKey(aa2c => aa2c.CollateralId);
|
||||||
|
|
||||||
|
builder.Entity<RepoCompanySelection>().ToTable("RepoCompanySelections");
|
||||||
|
builder.Entity<RepoCompanySelection>().HasKey(p => p.Id);
|
||||||
|
builder.Entity<RepoCompanySelection>().Property(p => p.RepoType)
|
||||||
|
.HasConversion(x => x.ToString(),
|
||||||
|
x => (RepoType)Enum.Parse(typeof(RepoType), x));
|
||||||
|
builder.Entity<ProcessingReceipt>().Property(p => p.Processed);
|
||||||
|
|
||||||
|
builder.Entity<SavedLocation>().ToTable("SavedLocations");
|
||||||
|
builder.Entity<SavedLocation>().HasKey(p => p.ID);
|
||||||
|
|
||||||
|
builder.Entity<ExternalUser>().ToTable("UserCache");
|
||||||
|
builder.Entity<ExternalUser>().HasKey(p => p.Id);
|
||||||
|
builder.Entity<ExternalUser>().Property(p => p.Name);
|
||||||
|
builder.Entity<ExternalUser>().Property(p => p.Code);
|
||||||
|
|
||||||
|
builder.Entity<SixtyPlusCollector>().ToTable("SixtyPlusCollector");
|
||||||
|
builder.Entity<SixtyPlusCollector>().HasKey(p => p.SixtyPlusCollectorId);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Persistence
|
||||||
|
{
|
||||||
|
public abstract class BaseRepository
|
||||||
|
{
|
||||||
|
protected readonly AppDbContext _context;
|
||||||
|
|
||||||
|
public BaseRepository(AppDbContext context)
|
||||||
|
{
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+52
@@ -0,0 +1,52 @@
|
|||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Results;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public class AuctionAssignmentNoteRepository : BaseRepository, IAuctionAssignmentNoteRepository
|
||||||
|
{
|
||||||
|
public AuctionAssignmentNoteRepository(AppDbContext context) : base(context) { }
|
||||||
|
|
||||||
|
public async Task<PagedResult<AuctionAssignmentNote>> ListAllAsync(int filterPage, int filterLimit)
|
||||||
|
{
|
||||||
|
var results = new PagedResult<AuctionAssignmentNote>();
|
||||||
|
var skip = (filterPage - 1) * filterLimit;
|
||||||
|
|
||||||
|
var temp = Queryable.OrderByDescending(from x in _context.AuctionAssignmentNotes
|
||||||
|
select x, x => x.Id);
|
||||||
|
|
||||||
|
results.Total = temp.Count();
|
||||||
|
results.Items = await temp.Skip(skip).Take(filterLimit).ToListAsync();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AuctionAssignmentNote> FindByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await Queryable.Where(_context.AuctionAssignmentNotes, c => c.Id == id).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<AuctionAssignmentNote>> FindConflictingNotes(DateTime written, string text, string writer)
|
||||||
|
{
|
||||||
|
return await Queryable.Where(_context.AuctionAssignmentNotes, c => c.DateWritten == written && c.Text == text && c.Writer == writer).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AuctionAssignmentNote> AddAsync(AuctionAssignmentNote auctionAssignmentNote)
|
||||||
|
{
|
||||||
|
var result = await _context.AuctionAssignmentNotes.AddAsync(auctionAssignmentNote);
|
||||||
|
return result.Entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(AuctionAssignmentNote auctionAssignmentNote)
|
||||||
|
{
|
||||||
|
_context.AuctionAssignmentNotes.Update(auctionAssignmentNote);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove(AuctionAssignmentNote auctionAssignmentNote)
|
||||||
|
{
|
||||||
|
_context.AuctionAssignmentNotes.Remove(auctionAssignmentNote);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
using LCU.API.Internal.RepoApi.Repos.Extensions;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Results;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public class AuctionAssignmentRepository : BaseRepository, IAuctionAssignmentRepository
|
||||||
|
{
|
||||||
|
public AuctionAssignmentRepository(AppDbContext context) : base(context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PagedResult<AuctionAssignment>> ListAllAsync(int filterPage, int filterLimit)
|
||||||
|
{
|
||||||
|
var results = new PagedResult<AuctionAssignment>();
|
||||||
|
var skip = (filterPage - 1) * filterLimit;
|
||||||
|
|
||||||
|
var temp = (from x in _context.AuctionAssignments
|
||||||
|
select x).OrderByDescending(x => x.ID);
|
||||||
|
|
||||||
|
results.Total = temp.Count();
|
||||||
|
results.Items = await temp.Skip(skip).Take(filterLimit).IncludeAll().ToListAsync();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PagedResult<AuctionAssignment>> ListReadyForFloorPriceAsync()
|
||||||
|
{
|
||||||
|
var results = new PagedResult<AuctionAssignment>();
|
||||||
|
|
||||||
|
var temp = (from x in _context.AuctionAssignments
|
||||||
|
where (x.FloorPrice ?? 0) == 0 && x.AutoIMS != null && x.AutoIMS.SoldDate == null &&
|
||||||
|
(x.AutoIMS.StatedMileage ?? -1) > 1 && x.AutoIMS.ScheduledSaleDate != null &&
|
||||||
|
x.AutoIMS.ScheduledSaleDate > DateTime.Now.Date &&
|
||||||
|
x.RedeemedDate == null &&
|
||||||
|
( (x.AutoIMS.ApprovedVehicleGrade ?? 0) > 0 || (x.AutoIMS.VehicleGrade ?? 0) > 0)
|
||||||
|
select x).OrderByDescending(x => x.ID);
|
||||||
|
|
||||||
|
results.Items = await temp.IncludeAll().ToListAsync();
|
||||||
|
results.Total = temp.Count();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AuctionAssignment> FindByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await Queryable.Where(_context.AuctionAssignments, c => c.ID == id).IncludeAll().FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IReadOnlyCollection<AuctionAssignment>> FindListByIdsAsync(IReadOnlyCollection<int> idSet)
|
||||||
|
{
|
||||||
|
return await Queryable.Where(_context.AuctionAssignments, c => idSet.Contains(c.ID)).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IReadOnlyCollection<AuctionAssignment>> FindByRepoIdAsync(int repoId)
|
||||||
|
{
|
||||||
|
return await _context.AuctionAssignments.Where(auctionAssignment => auctionAssignment.RepoId == repoId).IncludeAll().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AuctionAssignment> FindByByAuctionCustomerNoAndVin(string auctionCustomerNo, string vin)
|
||||||
|
{
|
||||||
|
return await Queryable
|
||||||
|
.Where(_context.AuctionAssignments, auctionAssignment =>
|
||||||
|
auctionAssignment.AuctionCustomerNo == auctionCustomerNo &&
|
||||||
|
auctionAssignment.CollateralVIN == vin &&
|
||||||
|
auctionAssignment.IsActive == true).IncludeAll().FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AuctionAssignment> AddAsync(AuctionAssignment auctionAssignment)
|
||||||
|
{
|
||||||
|
var result = await _context.AuctionAssignments.AddAsync(auctionAssignment);
|
||||||
|
result.Entity.Auction = Queryable.Where(_context.Auctions, a => a.AuctionID == result.Entity.AuctionId)
|
||||||
|
.FirstOrDefault();
|
||||||
|
return result.Entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(AuctionAssignment auctionAssignment)
|
||||||
|
{
|
||||||
|
_context.AuctionAssignments.Update(auctionAssignment);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove(AuctionAssignment auctionAssignment)
|
||||||
|
{
|
||||||
|
_context.AuctionAssignments.Remove(auctionAssignment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Results;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public class AuctionHouseRepository : BaseRepository, IAuctionHouseRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
public AuctionHouseRepository(AppDbContext context) : base(context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<AuctionHouse>> ListAllAsync()
|
||||||
|
{
|
||||||
|
return await _context.Auctions.ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task AddAsync(AuctionHouse auction)
|
||||||
|
{
|
||||||
|
await _context.Auctions.AddAsync(auction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AuctionHouse> FindByIdAsync(string id)
|
||||||
|
{
|
||||||
|
return await Queryable.Where<AuctionHouse>(_context.Auctions, c => c.AuctionID == id).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(AuctionHouse auction)
|
||||||
|
{
|
||||||
|
_context.Auctions.Update(auction);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove(AuctionHouse auction)
|
||||||
|
{
|
||||||
|
_context.Auctions.Remove(auction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Results;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public class AuditRecordRepository : BaseRepository, IAuditRecordRepository
|
||||||
|
{
|
||||||
|
public AuditRecordRepository(AppDbContext context) : base(context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<PagedResult<AuditRecord>> ListAllAsync(int filterPage, int filterLimit)
|
||||||
|
{
|
||||||
|
var results = new PagedResult<AuditRecord>();
|
||||||
|
var skip = (filterPage - 1) * filterLimit;
|
||||||
|
|
||||||
|
var temp = Queryable.OrderByDescending<AuditRecord, int>((from x in _context.AuditRecords
|
||||||
|
where x.DatePerformed > DateTime.Today.AddDays(-120)
|
||||||
|
select x), x => x.ID);
|
||||||
|
|
||||||
|
results.Total = temp.Count();
|
||||||
|
results.Items = await temp.Skip(skip).Take(filterLimit).ToListAsync();
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task AddAsync(AuditRecord auditRecord)
|
||||||
|
{
|
||||||
|
await _context.AuditRecords.AddAsync(auditRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<AuditRecord> FindByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await _context.AuditRecords.FindAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(AuditRecord auditRecord)
|
||||||
|
{
|
||||||
|
_context.AuditRecords.Update(auditRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove(AuditRecord auditRecord)
|
||||||
|
{
|
||||||
|
_context.AuditRecords.Remove(auditRecord);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
@@ -0,0 +1,17 @@
|
|||||||
|
using LCU.Library.Internal.LcuClassPatterns.Crud.Repositories;
|
||||||
|
using LCU.Library.Internal.RepoApiModels.Models;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories.Batch
|
||||||
|
{
|
||||||
|
public interface IRepoSyncBatchRepository: ICrudRepository<RepoSyncBatch>
|
||||||
|
{
|
||||||
|
Task<IEnumerable<RepoSyncBatch>> FindAllByRunInfoIdAsync(int id);
|
||||||
|
Task<RepoSyncBatch> FindUncompletedByAuditId(string auditItemKey);
|
||||||
|
Task<RepoSyncBatch> FindByBatchIdAndAuditIdAsync(int batchId, string auditItemKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
+9
@@ -0,0 +1,9 @@
|
|||||||
|
using LCU.Library.Internal.LcuClassPatterns.Crud.Repositories;
|
||||||
|
using LCU.Library.Internal.RepoApiModels.Models;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories.Batch
|
||||||
|
{
|
||||||
|
public interface IRepoSyncRunInfoRepository: ICrudRepository<RepoSyncRunInfo>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using LCU.Library.Internal.LcuClassPatterns.Crud.Repositories;
|
||||||
|
using LCU.Library.Internal.RepoApiModels.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories.Batch;
|
||||||
|
|
||||||
|
public class RepoSyncBatchRepository : CrudRepository<RepoSyncBatch>, IRepoSyncBatchRepository
|
||||||
|
{
|
||||||
|
private readonly AppDbContext _context;
|
||||||
|
public RepoSyncBatchRepository(AppDbContext context) : base(context) {
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<RepoSyncBatch>> FindAllByRunInfoIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await _context.RepoSyncBatch.Where(repoSyncBatch => repoSyncBatch.RepoSyncRunInfoId == id).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<RepoSyncBatch> FindByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await _context.RepoSyncBatch.Where(repoSyncBatch => repoSyncBatch.RepoSyncBatchId == id).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<RepoSyncBatch> FindUncompletedByAuditId(string auditItemKey) =>
|
||||||
|
await _context.RepoSyncBatch
|
||||||
|
.Where(repoSyncBatch => repoSyncBatch.AuditItemKey == auditItemKey && repoSyncBatch.RepoSyncCompletionDateTime == null)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
public async Task<RepoSyncBatch> FindByBatchIdAndAuditIdAsync(int batchId, string auditItemKey) =>
|
||||||
|
await _context.RepoSyncBatch
|
||||||
|
.Where(repoSyncBatch => repoSyncBatch.RepoSyncBatchId == batchId && repoSyncBatch.AuditItemKey == auditItemKey)
|
||||||
|
.FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using LCU.Library.Internal.LcuClassPatterns.Crud.Repositories;
|
||||||
|
using LCU.Library.Internal.RepoApiModels.Models;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories.Batch;
|
||||||
|
|
||||||
|
public class RepoSyncRunInfoRepository : CrudRepository<RepoSyncRunInfo>, IRepoSyncRunInfoRepository
|
||||||
|
{
|
||||||
|
private readonly AppDbContext _context;
|
||||||
|
public RepoSyncRunInfoRepository(AppDbContext context) : base(context) {
|
||||||
|
_context = context;
|
||||||
|
}
|
||||||
|
}
|
||||||
+46
@@ -0,0 +1,46 @@
|
|||||||
|
using LCU.API.Internal.RepoApi.Repos.Extensions;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public class CollateralRepository : BaseRepository, ICollateralRepository
|
||||||
|
{
|
||||||
|
|
||||||
|
public CollateralRepository(AppDbContext context) : base(context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Collateral>> ListAllAsync()
|
||||||
|
{
|
||||||
|
return await _context.Collaterals.IncludeAll().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Collateral> AddAsync(Collateral collateral)
|
||||||
|
{
|
||||||
|
var result = await _context.Collaterals.AddAsync(collateral);
|
||||||
|
return result.Entity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<Collateral> FindByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await Queryable.Where<Collateral>(_context.Collaterals, c => c.CollateralId == id).IncludeAll().FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<Collateral>> FindByRepoIdAsync(int repoId)
|
||||||
|
{
|
||||||
|
return await Queryable.Where<Collateral>(_context.Collaterals, c => c.RepoId == repoId).IncludeAll().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(Collateral collateral)
|
||||||
|
{
|
||||||
|
_context.Collaterals.Update(collateral);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove(Collateral collateral)
|
||||||
|
{
|
||||||
|
_context.Collaterals.Remove(collateral);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+266
@@ -0,0 +1,266 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Exceptions;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public class EventAlertRepository : BaseRepository, IEventAlertRepository
|
||||||
|
{
|
||||||
|
private const string RepoStatus = "REPO";
|
||||||
|
private const string O4RStatus = "O4R";
|
||||||
|
private const int ClosedAccountCutoffDays = 90;
|
||||||
|
|
||||||
|
private static List<string> _nonRepeatingAlerts = new List<string>
|
||||||
|
{
|
||||||
|
"Credit Adjustment Received",
|
||||||
|
"Debit Adjustment Received",
|
||||||
|
"Notice of Plan to Sell Not Found",
|
||||||
|
"Notice of Repossession Not Found",
|
||||||
|
"RTC Letter Not Found"
|
||||||
|
};
|
||||||
|
|
||||||
|
public EventAlertRepository(AppDbContext context) : base(context)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListAllAsync()
|
||||||
|
{
|
||||||
|
return await _context.EventAlerts.ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListUnreadAsync()
|
||||||
|
{
|
||||||
|
var result = from alert in _context.EventAlerts
|
||||||
|
join repo in _context.RepoAccounts
|
||||||
|
on alert.AccountNo equals repo.AccountNo
|
||||||
|
join activeStatus in _context.RepoManualStatuses
|
||||||
|
on repo.Status equals activeStatus.Description
|
||||||
|
where activeStatus.WatchForStatusChanges && alert.DateMarkedRead == null
|
||||||
|
select alert;
|
||||||
|
|
||||||
|
return await result.Distinct().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListWithinDateRangeAsync(DateTime start, DateTime end)
|
||||||
|
{
|
||||||
|
return await _context.EventAlerts.Where(e => e.DateAdded >= start && e.DateAdded <= end).ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListRepoNoAuctionAsync()
|
||||||
|
{
|
||||||
|
var closedDateCutoff = DateTime.Today.Subtract(TimeSpan.FromDays(ClosedAccountCutoffDays));
|
||||||
|
var accountsInRepo = (
|
||||||
|
from repo in _context.RepoAccounts
|
||||||
|
where repo.Status.Equals(RepoStatus) && (repo.DateClosed == null || repo.DateClosed > closedDateCutoff)
|
||||||
|
select repo);
|
||||||
|
|
||||||
|
var accountsInRepoWithAuction = (
|
||||||
|
from repo in accountsInRepo
|
||||||
|
join auctionAssignment in _context.AuctionAssignments
|
||||||
|
on repo.RepoId equals auctionAssignment.RepoId
|
||||||
|
where auctionAssignment.IsActive == true
|
||||||
|
select repo);
|
||||||
|
|
||||||
|
var accountsNoAuction = await accountsInRepo.Except(accountsInRepoWithAuction).ToListAsync();
|
||||||
|
|
||||||
|
return accountsNoAuction.Select(repo => new EventAlert()
|
||||||
|
{
|
||||||
|
AccountNo = repo.AccountNo,
|
||||||
|
RepoId = repo.RepoId,
|
||||||
|
Message = "Repo No Auction"
|
||||||
|
}).Distinct();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListRepoNoCompanyAsync()
|
||||||
|
{
|
||||||
|
return await ListStatusNoCompanyAsync(RepoStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListO4rNoCompanyAsync()
|
||||||
|
{
|
||||||
|
return await ListStatusNoCompanyAsync(O4RStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListStatusNoCompanyAsync(string status)
|
||||||
|
{
|
||||||
|
var closedDateCutoff = DateTime.Today.Subtract(TimeSpan.FromDays(ClosedAccountCutoffDays));
|
||||||
|
var result = from repo in _context.RepoAccounts
|
||||||
|
from collateral in _context.Collaterals.Where(c => c.RepoId == repo.RepoId)
|
||||||
|
from repoCompanySelection in _context.RepoCompanySelections.Where(x => x.CollateralId == collateral.CollateralId).DefaultIfEmpty()
|
||||||
|
where (repoCompanySelection == null || repoCompanySelection.RepoCompanyId == null) && repo.Status.Equals(status) && (repo.DateClosed == null || repo.DateClosed > closedDateCutoff)
|
||||||
|
select new EventAlert
|
||||||
|
{
|
||||||
|
AccountNo = repo.AccountNo,
|
||||||
|
RepoId = repo.RepoId,
|
||||||
|
Message = status + " No Repo Company"
|
||||||
|
};
|
||||||
|
|
||||||
|
var temp = await result.Distinct().ToListAsync();
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListReadyForRetitleAsync()
|
||||||
|
{
|
||||||
|
var result = from collateral in _context.Collaterals
|
||||||
|
join repo in _context.RepoAccounts
|
||||||
|
on collateral.RepoId equals repo.RepoId
|
||||||
|
join auctionAssignmentToCollateral in _context.AuctionAssignmentToCollaterals
|
||||||
|
on collateral.CollateralId equals auctionAssignmentToCollateral.CollateralId
|
||||||
|
join auctionAssignment in _context.AuctionAssignments
|
||||||
|
on auctionAssignmentToCollateral.AuctionAssignmentId equals auctionAssignment.ID
|
||||||
|
from data in Queryable.Where<ImsAutoFileData>(_context.ImsAutoFileData, ims => auctionAssignment.ID == ims.AuctionAssignmentId ||
|
||||||
|
(repo.RepoId == ims.RepoId && auctionAssignment.CollateralVIN == ims.VIN))
|
||||||
|
where collateral.RetitledInLandmarkName == null && repo.Status.Equals(RepoStatus) && auctionAssignment.IsActive && repo.RedemptionExpiredDate < DateTime.Today
|
||||||
|
select new EventAlert
|
||||||
|
{
|
||||||
|
AccountNo = repo.AccountNo,
|
||||||
|
RepoId = repo.RepoId,
|
||||||
|
Message = "Ready For Retitle"
|
||||||
|
};
|
||||||
|
|
||||||
|
return await result.Distinct().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListFloorUpdateFailedAsync()
|
||||||
|
{
|
||||||
|
var result = from autoFileData in _context.ImsAutoFileData
|
||||||
|
join repo in _context.RepoAccounts
|
||||||
|
on autoFileData.RepoId equals repo.RepoId
|
||||||
|
join collateral in _context.Collaterals
|
||||||
|
on repo.RepoId equals collateral.RepoId
|
||||||
|
join auctionAssignmentToCollateral in _context.AuctionAssignmentToCollaterals
|
||||||
|
on collateral.CollateralId equals auctionAssignmentToCollateral.CollateralId
|
||||||
|
join auctionAssignment in _context.AuctionAssignments
|
||||||
|
on auctionAssignmentToCollateral.AuctionAssignmentId equals auctionAssignment.ID
|
||||||
|
where ((auctionAssignment.HoldStatus ?? 0) == 0 || (auctionAssignment.HoldUntil ?? DateTime.Now) <= DateTime.Now) &&
|
||||||
|
auctionAssignment.RedeemedDate == null &&
|
||||||
|
autoFileData.SoldDate == null &&
|
||||||
|
(auctionAssignment.FloorPriceResponseCode != null && auctionAssignment.FloorPriceResponseCode != 1)
|
||||||
|
select new EventAlert
|
||||||
|
{
|
||||||
|
AccountNo = repo.AccountNo,
|
||||||
|
RepoId = repo.RepoId,
|
||||||
|
Message = "Floor Update Failed"
|
||||||
|
};
|
||||||
|
|
||||||
|
return await result.Distinct().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListFloorNeedsSettingAsync()
|
||||||
|
{
|
||||||
|
var result = from data in _context.ImsAutoFileData
|
||||||
|
join repo in _context.RepoAccounts
|
||||||
|
on data.RepoId equals repo.RepoId
|
||||||
|
join collateral in _context.Collaterals
|
||||||
|
on repo.RepoId equals collateral.RepoId
|
||||||
|
join auctionAssignmentToCollateral in _context.AuctionAssignmentToCollaterals
|
||||||
|
on collateral.CollateralId equals auctionAssignmentToCollateral.CollateralId
|
||||||
|
join auctionAssignment in _context.AuctionAssignments
|
||||||
|
on auctionAssignmentToCollateral.AuctionAssignmentId equals auctionAssignment.ID
|
||||||
|
where (auctionAssignment.FloorPrice ?? 0) == 0 &&
|
||||||
|
((auctionAssignment.HoldStatus ?? 0) == 0 || (auctionAssignment.HoldUntil ?? DateTime.Now) <= DateTime.Now) &&
|
||||||
|
auctionAssignment.RedeemedDate == null &&
|
||||||
|
data.SoldDate == null &&
|
||||||
|
data.ScheduledSaleDate != null &&
|
||||||
|
data.ScheduledSaleDate < DateTime.Now.AddDays(3) &&
|
||||||
|
repo.DateClosed == null
|
||||||
|
select new EventAlert
|
||||||
|
{
|
||||||
|
AccountNo = repo.AccountNo,
|
||||||
|
RepoId = repo.RepoId,
|
||||||
|
Message = "Floor Set Required"
|
||||||
|
};
|
||||||
|
|
||||||
|
return await result.Distinct().ToListAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task AddAsync(EventAlert eventAlert)
|
||||||
|
{
|
||||||
|
if (eventAlert.SubMessage != null && eventAlert.SubMessage.Length > 499)
|
||||||
|
{
|
||||||
|
eventAlert.SubMessage = eventAlert.SubMessage.Substring(0, 499);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsDuplicateAlert(eventAlert))
|
||||||
|
{
|
||||||
|
await _context.EventAlerts.AddAsync(eventAlert);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new DuplicateResourceException("EventAlert");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> AddRangeAsync(IEnumerable<EventAlert> eventAlerts)
|
||||||
|
{
|
||||||
|
List<EventAlert> filteredEventAlerts = new List<EventAlert>();
|
||||||
|
|
||||||
|
foreach (EventAlert eventAlert in eventAlerts)
|
||||||
|
{
|
||||||
|
if (eventAlert.SubMessage != null && eventAlert.SubMessage.Length > 499)
|
||||||
|
{
|
||||||
|
eventAlert.SubMessage = eventAlert.SubMessage.Substring(0, 499);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!IsDuplicateAlert(eventAlert))
|
||||||
|
{
|
||||||
|
filteredEventAlerts.Add(eventAlert);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.Debug($"EventAlertRepository: Valid Alert Already Exists eventAlert: {@eventAlert}." +
|
||||||
|
$" Will Continue without adding this to Event Alerts Context.", eventAlerts, eventAlert
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await _context.EventAlerts.AddRangeAsync(filteredEventAlerts);
|
||||||
|
return filteredEventAlerts;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsDuplicateAlert(EventAlert eventAlert)
|
||||||
|
{
|
||||||
|
var duplicateAlerts = (
|
||||||
|
from alert in _context.EventAlerts
|
||||||
|
where alert.AccountNo == eventAlert.AccountNo &&
|
||||||
|
alert.Message == eventAlert.Message &&
|
||||||
|
(
|
||||||
|
alert.DateMarkedRead == null ||
|
||||||
|
alert.DateMarkedRead > DateTime.Now.AddHours(-24) ||
|
||||||
|
_nonRepeatingAlerts.Contains(alert.Message)
|
||||||
|
)
|
||||||
|
select alert
|
||||||
|
).ToList();
|
||||||
|
|
||||||
|
return (duplicateAlerts.Any());
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<EventAlert> FindByIdAsync(int id)
|
||||||
|
{
|
||||||
|
return await _context.EventAlerts.FindAsync(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(EventAlert category)
|
||||||
|
{
|
||||||
|
_context.EventAlerts.Update(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Remove(EventAlert category)
|
||||||
|
{
|
||||||
|
_context.EventAlerts.Remove(category);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<EventAlert>> ListUnreadByAccountNoAsync(string accountNo)
|
||||||
|
{
|
||||||
|
var results = _context.EventAlerts.Where(x => x.AccountNo == accountNo && x.DateMarkedRead == null);
|
||||||
|
return await results.ToListAsync();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Persistence;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public class ExternalUserRepository : BaseRepository, IExternalUserRepository
|
||||||
|
{
|
||||||
|
public ExternalUserRepository(AppDbContext context) : base(context) { }
|
||||||
|
|
||||||
|
public async Task<IReadOnlyCollection<ExternalUser>> ListAsync()
|
||||||
|
{
|
||||||
|
var result = await _context.ExternalUsers.AsNoTracking().ToListAsync();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<ExternalUser> FindByReferenceIdAsync(int referenceId)
|
||||||
|
{
|
||||||
|
return await _context.ExternalUsers.AsNoTracking().Where(user => user.ReferenceId == referenceId).FirstOrDefaultAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task SynchronizeSet(IReadOnlyCollection<ExternalUser> externalUsers)
|
||||||
|
{
|
||||||
|
foreach (var user in externalUsers)
|
||||||
|
{
|
||||||
|
var existing = await FindByReferenceIdAsync(user.ReferenceId);
|
||||||
|
if (existing != null)
|
||||||
|
{
|
||||||
|
user.Id = existing.Id;
|
||||||
|
_context.Entry(user).State = EntityState.Modified;
|
||||||
|
_context.ExternalUsers.Update(user);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _context.ExternalUsers.AddAsync(user);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Results;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public interface IAuctionAssignmentNoteRepository
|
||||||
|
{
|
||||||
|
Task<PagedResult<AuctionAssignmentNote>> ListAllAsync(int filterPage, int filterLimit);
|
||||||
|
Task<AuctionAssignmentNote> FindByIdAsync(int id);
|
||||||
|
Task<IEnumerable<AuctionAssignmentNote>> FindConflictingNotes(DateTime written, string text, string writer);
|
||||||
|
Task<AuctionAssignmentNote> AddAsync(AuctionAssignmentNote auctionAssignmentNote);
|
||||||
|
void Update(AuctionAssignmentNote auctionAssignmentNote);
|
||||||
|
void Remove(AuctionAssignmentNote auctionAssignmentNote);
|
||||||
|
}
|
||||||
|
}
|
||||||
+20
@@ -0,0 +1,20 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models;
|
||||||
|
using LCU.API.Internal.RepoApi.Repos.Models.Results;
|
||||||
|
|
||||||
|
namespace LCU.API.Internal.RepoApi.Repos.Repositories
|
||||||
|
{
|
||||||
|
public interface IAuctionAssignmentRepository
|
||||||
|
{
|
||||||
|
Task<PagedResult<AuctionAssignment>> ListAllAsync(int filterPage, int filterLimit);
|
||||||
|
Task<PagedResult<AuctionAssignment>> ListReadyForFloorPriceAsync();
|
||||||
|
Task<AuctionAssignment> FindByIdAsync(int id);
|
||||||
|
Task<IReadOnlyCollection<AuctionAssignment>> FindByRepoIdAsync(int repoId);
|
||||||
|
Task<AuctionAssignment> FindByByAuctionCustomerNoAndVin(string auctionCustomerNo, string vin);
|
||||||
|
Task<AuctionAssignment> AddAsync(AuctionAssignment auctionAssignment);
|
||||||
|
void Update(AuctionAssignment auctionAssignment);
|
||||||
|
void Remove(AuctionAssignment auctionAssignment);
|
||||||
|
Task<IReadOnlyCollection<AuctionAssignment>> FindListByIdsAsync(IReadOnlyCollection<int> idSet);
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user