initial commit
This commit is contained in:
commit
be13205ffd
19 changed files with 33596 additions and 0 deletions
28
interfaces/Nostro-Account.cppm
Normal file
28
interfaces/Nostro-Account.cppm
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
//SPDX-License-Identifier: LGPL-3.0-only
|
||||
//SPDX-FileCopyrightText: Copyright (C) 2026 Catcrafts®
|
||||
|
||||
export module Nostro:Account;
|
||||
|
||||
import std;
|
||||
import :Currency;
|
||||
import :Transaction;
|
||||
|
||||
namespace Nostro {
|
||||
export struct Account {
|
||||
std::string name;
|
||||
std::string bic;
|
||||
std::string iban;
|
||||
Currency currency;
|
||||
std::int64_t balance;
|
||||
|
||||
std::vector<Transaction> transactions;
|
||||
};
|
||||
}
|
||||
|
||||
template<std::derived_from<Nostro::Account> T>
|
||||
struct std::formatter<T> : std::formatter<std::string> {
|
||||
auto format(const Nostro::Account& obj, std::format_context& ctx) const {
|
||||
return std::formatter<std::string>::format(std::format("{}\t{} {}\t{}{}", obj.name, obj.bic, obj.iban, obj.currency, Nostro::FormatAmount(obj.balance, obj.currency)), ctx);
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Reference in a new issue