using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using AutoMapper.Configuration.Conventions;
using LoanworksOriginatorPortalAPI.Infrastructure;
namespace LoanworksOriginatorPortalAPI.Model.APIv1
public Guid ApplicationID { get; set; }
public int? ExternalID { get; set; }
public DateTime CreatedDate { get; set; }
public DateTime UpdatedDate { get; set; }
public List<ApplicantIndividual> Applicants { get; set; } = new List<ApplicantIndividual>();
public List<ApplicantCorporate> CorporateApplicants { get; set; } = new List<ApplicantCorporate>();
public List<Security> SecuredAssets { get; set; }
public Financials Financials { get; set; }
public LoanDetails LoanDetails { get; set; }
public List<FundsPositionItem> FundsPosition { get; set; } = new List<FundsPositionItem>();
public Declarations Declarations { get; set; }
public class ProofOfIdentity
public Guid ProofOfIdentityID { get; set; }
public string DocumentType { get; set; }
public string DocumentNumber { get; set; }
public string NameOnDocument { get; set; }
public DateTime? DateOfIssue { get; set; }
public DateTime? ExpiryDate { get; set; }
[LookupValue( "State", LookupValueKind.ItemName )]
public string StateOfIssue { get; set; }
public string MedicareCardColour { get; set; }
public int? MedicareCardPosition { get; set; }
public int FileID { get; set; }
public class ApplicantRelationship
public Guid GUID { get; set; }
public string RelatedToBorrowerId { get; set; }
public int RelatedToBorrowerStatus { get; set; }
public class ApplicantBase
public class ApplicantIndividual:ApplicantBase
public int BorrowerID { get; set; }
public Guid GUID { get; set; }
public PersonalDetails PersonalDetails { get; set; }
public CurrentResidentialAddress CurrentAddress { get; set; }
public MailAddress MailAddress { get; set; }
public PostSettlementAddress PostSettlementAddress { get; set; }
public PostSettlementMailAddress PostSettlementMailAddress { get; set; }
public EmploymentDetails CurrEmploymentDetails { get; set; }
public EmploymentDetails PreviousEmploymentDetails { get; set; }
public SolicitorDetails SolicitorDetails { get; set; }
public List<ProofOfIdentity> POI { get; set; } = new List<ProofOfIdentity>();
public class ApplicantCorporate:ApplicantBase
public ApplicantCorporate()
Incomes = new List<Income>();
Assets = new List<Asset>();
Liabilities = new List<Liability>();
public int BorrowerID { get; set; }
public Guid GUID { get; set; }
public string Description { get; set; }
public CompanyDetails CorporateDetails { get; set; }
public RegisteredAddress RegisteredAddress { get; set; }
public TradingAddress TradingAddress { get; set; }
public ContactDetails ContactDetails { get; set; }
public SolicitorDetails SolicitorDetails { get; set; }
public AccountantDetails AccountantDetails { get; set; }
public List<Income> Incomes { get; set; }
public List<Asset> Assets { get; set; }
public List<Liability> Liabilities { get; set; }
public class PersonalDetails
RelatedTo = new List<ApplicantRelationship>();
public bool PrimaryApplicant { get; set; }
public bool Guarantor { get; set; }
public bool LimitedGuarantee { get; set; }
public bool MarketingConsent { get; set; }
public bool CreditAuthoritySigned { get; set; }
public bool Allow3rdPartyDisclosure { get; set; }
public Nullable<decimal> GuaranteeAmount { get; set; }
public string TrustName { get; set; }
public DateTime? TrustDate { get; set; }
[LookupValue( "Salutation", LookupValueKind.ItemName )]
public string Title { get; set; }
public string Firstname { get; set; }
public string Middlename { get; set; }
public string Surname { get; set; }
[LookupValue( "Sex", LookupValueKind.ItemName )]
public string Gender { get; set; }
public DateTime DateOfBirth { get; set; }
public string EmailAddress { get; set; }
public string HomePhoneNumber { get; set; }
public string MobilePhoneNumber { get; set; }
public string WorkPhoneNumber { get; set; }
public string FaxNumber { get; set; }
public bool HasDeclaredBankruptcy { get; set; }
[LookupValue( "Residency Status", LookupValueKind.LIXIcode )]
public string ResidencyStatus { get; set; }
[LookupCountry( LookupCountryKind.Alpha2 )]
public string ResidencyCountry { get; set; }
[LookupValue( "Citizenship Status", LookupValueKind.LIXIcode )]
public string CitizenshipStatus { get; set; }
[LookupCountry( LookupCountryKind.Alpha2 )]
public string CitizenshipCountry { get; set; }
public bool HasBeenConvicted { get; set; }
public string RelationshipStatus { get; set; }
public int NumberOfDependents { get; set; }
public List<int> DependentsList { get; set; }
public bool EmailSMSStatusUpdate { get; set; }
public bool PrivacyActConsentSigned { get; set; }
public bool UnderstandApplication { get; set; }
public bool DVSConsent { get; set; }
public string DriverLicense { get; set; }
[LookupValue( "State", LookupValueKind.ItemName )]
public string DriverLicenseState { get; set; }
public List<ApplicantRelationship> RelatedTo { get; set; }
public class CompanyDetails
public bool PrimaryApplicant { get; set; }
public bool Guarantor { get; set; }
public bool LimitedGuarantee { get; set; }
public Nullable<decimal> GuaranteeAmount { get; set; }
public bool MarketingConsent { get; set; }
public bool CreditAuthoritySigned { get; set; }
public bool Allow3rdPartyDisclosure { get; set; }
public string TrustName { get; set; }
public DateTime? TrustDate { get; set; }
public string CompanyName { get; set; }
public string ABN { get; set; }
public string ACN { get; set; }
public string NatureOfBusiness { get; set; }
public string EntityName { get; set; }
public string Status { get; set; }
[LookupValue( "Company Type", LookupValueKind.LIXIcode )]
public string CompanyType { get; set; }
public DateTime? IncorporationDate { get; set; }
[LookupValue( "State", LookupValueKind.ItemName )]
public string IncorporationState { get; set; }
[LookupCountry( LookupCountryKind.Alpha2 )]
public string IncorporationCountry { get; set; }
public List<Income> Incomes { get; set; } = new List<Income>();
public List<Asset> Assets { get; set; } = new List<Asset>();
public List<Liability> Liabilities { get; set; } = new List<Liability>();
public List<Household> Households { get; set; } = new List<Household>();
public class FinancialBase
public class FinancialOwnership
public int BorrowerID { get; set; }
public bool IsMortgagor { get; set; }
public decimal OwnershipPercentage { get; set; }
public class Income:FinancialBase
public int IncomeId { get; set; }
public Guid GUID { get; set; }
[LookupValue( "Income Type", LookupValueKind.LIXIcode )]
public string IncomeType { get; set; }
[LookupValue( "Income Period", LookupValueKind.LIXIcode )]
public string IncomeFrequency { get; set; }
public float GrossIncome { get; set; }
public DateTime? StartDate { get; set; }
public DateTime? EndDate { get; set; }
public string Notes { get; set; }
public List<FinancialOwnership> Ownership { get; set; } = new List<FinancialOwnership>();
public class Liability:FinancialBase
public int LiabilityID { get; set; }
public Guid GUID { get; set; }
public string NameOfInstitution { get; set; }
public string LiabilityType { get; set; }
public float AmountOwing { get; set; }
public float CreditLimit { get; set; }
public string PaymentFrequency { get; set; }
public float RepaymentAmount { get; set; }
public string AccountNumber { get; set; }
public string BSB { get; set; }
public string ClearedWith { get; set; }
public int LinkedIncomeID { get; set; }
public int LinkedAssetID { get; set; }
public string Notes { get; set; }
[LookupValue( "Payout On Settlement", LookupValueKind.LIXIcode )]
public string PayOutOnSettlement { get; set; }
public List<FinancialOwnership> Ownership { get; set; } = new List<FinancialOwnership>();
public int HouseholdID { get; set; }
public Guid GUID { get; set; }
public List<int> Members { get; set; } = new List<int>();
public List<Expense> Expenses { get; set; } = new List<Expense>();
public class Expense:FinancialBase
public Guid GUID { get; set; }
public string Institution { get; set; }
public string Label { get; set; }
public string Type { get; set; }
public decimal? Limit { get; set; }
public decimal? Balance { get; set; }
public string Frequency { get; set; }
public decimal? Amount { get; set; }
public decimal? PerMonth { get; set; }
public decimal? InterestRate { get; set; }
[LookupValue( "Rate Type", LookupValueKind.LIXIcode )]
public string RateType { get; set; }
[LookupValue( "Loan Type", LookupValueKind.ItemName )]
public string LoanType { get; set; }
public string Notes { get; set; }
public class Asset:FinancialBase
public int AssetID { get; set; }
public Guid GUID { get; set; }
[LookupValue( "Asset Type", LookupValueKind.LIXIcode )]
public string AssetType { get; set; }
public string Description { get; set; }
public decimal AssetValue { get; set; }
public Guid? AddressID { get; set; }
public decimal LandArea { get; set; }
[LookupValue( "UnitOfMeasurement", LookupValueKind.LIXIcode )]
public string LandAreaUnitMeasure { get; set; }
[LookupValue( "Security Purpose", LookupValueKind.LIXIcode )]
public string PropertyUsage { get; set; }
public bool SinceSold { get; set; }
[LookupValue( "Zoning", LookupValueKind.LIXIcode )]
public string Zoning { get; set; }
public string PropertyType { get; set; }
[LookupValue( "SecurityTitleType", LookupValueKind.LIXIcode )]
public string TitleType { get; set; } = "";
public List<FinancialOwnership> Ownership { get; set; } = new List<FinancialOwnership>();
public class SecurityDetails
public Guid? AddressID { get; set; }
[LookupValue( "Security Purpose", LookupValueKind.LIXIcode )]
public string PropertyUsage { get; set; }
public decimal PurchasePrice { get; set; }
public decimal EstimatedValue { get; set; }
[LookupValue( "SecurityTitleType", LookupValueKind.LIXIcode )]
public string TitleType { get; set; }
[LookupValue( "Property Type", LookupValueKind.LIXIcode )]
public string PropertyType { get; set; }
public decimal? LandValue { get; set; }
public decimal? ConstructionValue { get; set; }
public decimal LivingSpaceArea { get; set; }
[LookupValue( "UnitOfMeasurement", LookupValueKind.LIXIcode )]
public string LivingSpaceUnitMeasure { get; set; }
public decimal? LandSize { get; set; }
[LookupValue( "UnitOfMeasurement", LookupValueKind.LIXIcode )]
public string LandSizeMeasurement { get; set; }
public bool MoreThan3Units { get; set; }
public bool MoreThan25Percent { get; set; }
public bool PurchaseOffPlans { get; set; }
public bool PrimaryPlace { get; set; }
[LookupValue( "Security Status", LookupValueKind.LIXIcode )]
public string SecurityStatus { get; set; }
[LookupValue( "Security Occupancy", LookupValueKind.LIXIcode )]
public string SecurityOccupancy { get; set; }
[LookupValue( "Security Transaction", LookupValueKind.LIXIcode )]
public string SecurityTransaction { get; set; }
[LookupValue( "Security Class", LookupValueKind.LIXIcode )]
public string SecurityClass { get; set; }
[LookupValue( "Holding", LookupValueKind.LIXIcode )]
public string Holding { get; set; }
public int LinkedRentalIncome { get; set; }
public int LinkedMortgage { get; set; }
public class Security :FinancialBase
public int SecurityID { get; set; }
public Guid GUID { get; set; }
public SecurityDetails SecurityDetails { get; set; }
public ContactDetails ValuerContactDetails { get; set; }
public List<FinancialOwnership> Ownership { get; set; } = new List<FinancialOwnership>();
public class CurrentResidentialAddress
public CurrentResidentialAddress()
PreviousAddressArray = new List<PreviousAddress>();
public string HousingSituation { get; set; }
public string ResidentialType { get; set; }
public Guid? AddressID { get; set; }
public int YearsCurrentAddress { get; set; }
public int MonthCurrentAddress { get; set; }
public List<PreviousAddress> PreviousAddressArray { get; set; }
public class PreviousAddress
public Guid? AddressID { get; set; }
public int? Years { get; set; }
public int? Months { get; set; }
public class PostSettlementAddress
public Guid? AddressID { get; set; }
public string Type { get; set; }
public class PostSettlementMailAddress
public string MailingAddressType { get; set; }
public Guid? AddressID { get; set; }
public bool IsPOBox { get; set; }
public string POBoxType { get; set; }
public string MailingAddressType { get; set; }
public Guid? AddressID { get; set; }
public bool IsPOBox { get; set; }
public string POBoxType { get; set; }
public class RegisteredAddress
public Guid? AddressID { get; set; }
public DateTime RegisteredAddressDate { get; set; }
public class TradingAddress
public Guid? AddressID { get; set; }
public int? CurrAddressYears { get; set; }
public int? CurrAddressMonths { get; set; }
public Guid AddressID { get; set; }
public Guid ApplicationID { get; set; }
[LookupValue( "Address Format", LookupValueKind.LIXIcode )]
public string Format { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string LotNo { get; set; }
public string BuildingName { get; set; }
public string FloorNo { get; set; }
public string UnitNo { get; set; }
public string StreetNo { get; set; }
public string StreetName { get; set; }
[LookupValue( "Street Type", LookupValueKind.LIXIcode )]
public string StreetType { get; set; }
public string Suburb { get; set; }
public string Postcode { get; set; }
[LookupValue( "State", LookupValueKind.ItemName )]
public string State { get; set; }
[LookupValue( "Town City", LookupValueKind.LIXIcode )]
public string TownCity { get; set; }
[LookupCountry( LookupCountryKind.Alpha2 )]
public string Country { get; set; }
public class EmploymentDetails
public string Occupation { get; set; }
public string CompanyName { get; set; }
[LookupValue( "Company Type", LookupValueKind.LIXIcode )]
public string CompanyType { get; set; }
public string EmployerName { get; set; }
public Guid? EmployerAddressID { get; set; }
public string EmployerContact { get; set; }
public decimal GrossIncome { get; set; }
[LookupValue( "Employment Type", LookupValueKind.LIXIcode )]
public string EmploymentType { get; set; }
[LookupValue( "Self Employement Type", LookupValueKind.LIXIcode )]
public string SelfEmploymentType { get; set; }
public int EmploymentYears { get; set; }
public int EmploymentMonths { get; set; }
public string ABN { get; set; }
public string ACN { get; set; }
public bool? GSTRegistered { get; set; }
public string EntityName { get; set; }
public string Status { get; set; }
public bool OnProbabtion { get; set; }
[LookupValue( "Occupation Code", LookupValueKind.LIXIcode )]
public string OccupationCode { get; set; }
[LookupValue( "Occupation Type", LookupValueKind.ItemName )]
public string OccupationType { get; set; }
public class SolicitorDetails
public Guid SolicitorID { get; set; }
public string PracticeName { get; set; }
public string PersonName { get; set; }
public string Phone { get; set; }
public string Mobile { get; set; }
public string Fax { get; set; }
public string Email { get; set; }
public Guid? AddressID { get; set; }
public class ContactDetails
public string Name { get; set; }
public string PhoneNumber { get; set; }
public class AccountantDetails
public Guid AccountantID { get; set; }
public string PracticeName { get; set; }
public string PersonName { get; set; }
public string Phone { get; set; }
public string Mobile { get; set; }
public string Fax { get; set; }
public string Email { get; set; }
public Guid AddressID { get; set; }
public class Declarations
public int CreditEvents { get; set; }
public int MortgageArrears { get; set; }
public int BankruptcyStatus { get; set; }
public List<ProductDetails> Products { get; set; } = new List<ProductDetails>();
public class ProductDetails
public Guid GUID { get; set; }
public int ProductID { get; set; }
public string ProductName { get; set; }
public string ProductCode { get; set; }
[LookupValue( "Product Loan Purpose", LookupValueKind.LIXIcode )]
public string LoanPurpose { get; set; }
[LookupValue( "Product Loan Type", LookupValueKind.LIXIcode )]
public string LoanType { get; set; }
[LookupValue( "Product Type", LookupValueKind.ItemName )]
public string RepaymentType { get; set; }
[LookupValue( "Frequency", LookupValueKind.ItemName )]
public string RepaymentFrequency { get; set; }
public int FixedRateTermYears { get; set; }
public int InterestOnlyTermYears { get; set; }
public int SplitId { get; set; }
public List<LoanPurpose> LendingPurpose { get; set; } = new List<LoanPurpose>();
public Guid GUID { get; set; }
public string LendingPurposeCode { get; set; }
public string Description { get; set; }
public decimal PurposeAmount { get; set; }
public class FundsPositionItem
public Guid GUID { get; set; }
public string LookupFundsPositionID { get; set; }
public decimal Amount { get; set; }
public class LookupCategory
public int CategoryID { get; set; }
public string Name { get; set; }
public int CategoryID { get; set; }
public int ItemID { get; set; }
public string Name { get; set; }
public string LixiCode { get; set; }
public class LookupCountry
[LookupCountry( LookupCountryKind.Alpha2 )]
public string Alpha2 { get; set; }
[LookupCountry( LookupCountryKind.Alpha3 )]
public string Alpha3 { get; set; }
[LookupCountry( LookupCountryKind.NumericCode )]
public string NumericCode { get; set; }
public string ShortName { get; set; }
public bool IsDefault { get; set; }
public bool IsActive { get; set; }
public class LookupFundsPositionItem
public string Name { get; set; }
public int ExternalID { get; set; }
[LookupValue( "Funds Position Type", LookupValueKind.ItemName )]
public string Type { get; set; }