---
# System prepended metadata

title: Bank
tags: [nextup]

---

# Bank
###### tags: `nextup`

## Domain model
```plantuml

BankAccount -up-> "1" Bank
BankStatement "*" --> "1" BankAccount
BankTransaction "*" --> "1" BankAccount
BankTransaction "*" --> "1" BankStatement

class Bank {
    name: String
    description: String
}

class BankAccount {
    iban: String
    bankIdentifier: String
    currency: String
    name: String
    status: BankAccountStatus
    syncable: boolean
}

class BankStatement {
    origin: BankStatementOrigin
    dateIssued: LocalDateTime
}

class BankTransaction {
    bankTransactionId: String
    amount: BigDecimal
    status: BankTransactionStatus
    assignmentStatus: BankTransactionAssignmentStatus
    type: BankTransactionType
    settledAt: LocalDateTime
    note: String
    searchText: String
}

enum BankAccountStatus {
    ACTIVE,
    INACTIVE
}

enum BankStatementOrigin {
    MANUALLY,
    SCHEDULER,
}

enum BankTransactionStatus {
    COMPLETED,
    PENDING,
    FAILED
}

enum BankTransactionAssignmentStatus {
    ASSIGNED,
    IGNORED,
    UNASSIGNED
}

enum BankTransactionType {
    CREDIT,
    DEBIT
}

```