mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 22:04:03 +00:00
feat(finance): add settlement currency and cycle fx rates
This commit is contained in:
@@ -14,6 +14,15 @@ export interface FinanceCycleRecord {
|
||||
currency: CurrencyCode
|
||||
}
|
||||
|
||||
export interface FinanceCycleExchangeRateRecord {
|
||||
cycleId: string
|
||||
sourceCurrency: CurrencyCode
|
||||
targetCurrency: CurrencyCode
|
||||
rateMicros: bigint
|
||||
effectiveDate: string
|
||||
source: 'nbg'
|
||||
}
|
||||
|
||||
export interface FinanceRentRuleRecord {
|
||||
amountMinor: bigint
|
||||
currency: CurrencyCode
|
||||
@@ -64,6 +73,14 @@ export interface FinanceRepository {
|
||||
openCycle(period: string, currency: CurrencyCode): Promise<void>
|
||||
closeCycle(cycleId: string, closedAt: Instant): Promise<void>
|
||||
saveRentRule(period: string, amountMinor: bigint, currency: CurrencyCode): Promise<void>
|
||||
getCycleExchangeRate(
|
||||
cycleId: string,
|
||||
sourceCurrency: CurrencyCode,
|
||||
targetCurrency: CurrencyCode
|
||||
): Promise<FinanceCycleExchangeRateRecord | null>
|
||||
saveCycleExchangeRate(
|
||||
input: FinanceCycleExchangeRateRecord
|
||||
): Promise<FinanceCycleExchangeRateRecord>
|
||||
addUtilityBill(input: {
|
||||
cycleId: string
|
||||
billName: string
|
||||
|
||||
Reference in New Issue
Block a user