Private
Public Access
1
0
Files
Purrse/src/Purrse.Core/DTOs/LoanDtos.cs
T
Catherine Renelle 3bb9c688ed Auto-populate loan details from Plaid liabilities and pre-fill setup form
Fetch loan data (mortgage/student) from Plaid's Liabilities API during sync
and auto-create LoanDetail records. For accounts without liabilities data,
pre-populate the setup form with balance, interest rate, and smart term
defaults. Also fixes maturity date computation in the frontend form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 16:23:49 -05:00

58 lines
1.4 KiB
C#

namespace Purrse.Core.DTOs;
public record CreateLoanDetailRequest(
decimal OriginalBalance,
decimal InterestRate,
int TermMonths,
decimal MonthlyPayment,
DateTime OriginationDate,
DateTime MaturityDate,
decimal? EscrowAmount,
decimal? ExtraPayment
);
public record LoanDetailResponse(
Guid Id,
Guid AccountId,
string AccountName,
decimal OriginalBalance,
decimal CurrentBalance,
decimal InterestRate,
int TermMonths,
decimal MonthlyPayment,
DateTime OriginationDate,
DateTime MaturityDate,
decimal? EscrowAmount,
decimal? ExtraPayment,
List<AmortizationEntryResponse> AmortizationSchedule
);
public record AmortizationEntryResponse(
int PaymentNumber,
DateTime PaymentDate,
decimal PaymentAmount,
decimal PrincipalAmount,
decimal InterestAmount,
decimal? EscrowAmount,
decimal RemainingBalance
);
public record LoanDefaultsResponse(
decimal OriginalBalance,
decimal InterestRate,
int TermMonths,
bool HasSyncData
);
public record PayoffScenarioRequest(decimal? ExtraMonthlyPayment, decimal? LumpSumPayment, DateTime? LumpSumDate);
public record PayoffScenarioResponse(
DateTime OriginalPayoffDate,
DateTime NewPayoffDate,
decimal TotalInterestOriginal,
decimal TotalInterestNew,
decimal InterestSaved,
int MonthsSaved,
List<AmortizationEntryResponse> NewSchedule
);