heavy refactor
This commit is contained in:
+55
-25
@@ -1,32 +1,62 @@
|
||||
from pathlib import Path
|
||||
|
||||
from faker import Faker
|
||||
|
||||
from src.models import ComdirectCreditCard, ComdirectDepot, ComdirectGiro
|
||||
from src.settings.constants import Currency
|
||||
from src.settings.models import AccountInfo
|
||||
from src.constants import Currency
|
||||
from src.ingest.b4w import ingest_b4w, reader_b4w
|
||||
from src.ingest.comdirect import reader_comdirect
|
||||
from src.models import (
|
||||
ComdirectCreditCard,
|
||||
ComdirectDepot,
|
||||
ComdirectGiro,
|
||||
)
|
||||
from src.models.settings import Account, Source
|
||||
|
||||
fake = Faker()
|
||||
|
||||
BANK_ACCOUNTS = {
|
||||
"comdirect": {
|
||||
"Girokonto": AccountInfo(
|
||||
iban=fake.iban(),
|
||||
ingestion_function=lambda x: ComdirectGiro.model_validate(x),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
"Visa-Karte (Kreditkarte)": AccountInfo(
|
||||
iban=fake.iban(),
|
||||
ingestion_function=lambda x: ComdirectCreditCard.model_validate(x),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
"Tagesgeld PLUS-Konto": AccountInfo(
|
||||
iban=fake.iban(),
|
||||
ingestion_function=lambda x: ComdirectGiro.model_validate(x),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
"Depot": AccountInfo(
|
||||
iban=fake.iban(),
|
||||
ingestion_function=lambda x: ComdirectDepot.model_validate(x),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
}
|
||||
"b4w": Source(
|
||||
name="b4w",
|
||||
source_path=Path(""),
|
||||
reader_function=reader_b4w,
|
||||
accounts=[
|
||||
Account(
|
||||
name="b4w",
|
||||
ingestion_function=ingest_b4w,
|
||||
iban=fake.iban(),
|
||||
currency=Currency.EUR,
|
||||
)
|
||||
],
|
||||
),
|
||||
"comdirect": Source(
|
||||
name="comdirect",
|
||||
source_path=Path(""),
|
||||
reader_function=reader_comdirect,
|
||||
accounts=[
|
||||
Account(
|
||||
name="Girokonto",
|
||||
ingestion_function=lambda x: ComdirectGiro.model_validate(x),
|
||||
iban=fake.iban(),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
Account(
|
||||
name="Visa-Karte (Kreditkarte)",
|
||||
ingestion_function=lambda x: ComdirectCreditCard.model_validate(x),
|
||||
iban=fake.iban(),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
Account(
|
||||
name="Tagesgeld PLUS-Konto",
|
||||
ingestion_function=lambda x: ComdirectGiro.model_validate(x),
|
||||
iban=fake.iban(),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
Account(
|
||||
name="Depot",
|
||||
ingestion_function=lambda x: ComdirectDepot.model_validate(x),
|
||||
iban=fake.iban(),
|
||||
currency=Currency.EUR,
|
||||
),
|
||||
],
|
||||
),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user