finnow/finnow-api/source/account/data.d

20 lines
651 B
D
Raw Normal View History

module account.data;
import handy_httpd.components.optional;
import account.model;
import money.currency;
import history.model;
interface AccountRepository {
Optional!Account findById(ulong id);
Account insert(AccountType type, string numberSuffix, string name, Currency currency, string description);
void setArchived(ulong id, bool archived);
Account update(ulong id, in Account newData);
void deleteById(ulong id);
Account[] findAll();
AccountCreditCardProperties getCreditCardProperties(ulong id);
void setCreditCardProperties(ulong id, in AccountCreditCardProperties props);
History getHistory(ulong id);
}