model
Drebedengi data model & API dictionaries module
Account ¶
Drebedengi account model.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
id is a unique identifier for the account. |
budget_family_id |
int
|
User family ID (for multiuser mode) |
object_type |
ObjectType
|
Always ObjectType.ACCOUNT |
name |
str
|
Account name assigned by the user. |
is_hidden |
bool
|
True if the account is hidden. |
is_autohide |
bool
|
True if the account is configured to hide on zero balance. |
is_loan |
bool
|
True if the account is for loans (both taken and given). |
sort |
int
|
Sort order of the account. |
wallet_user_id |
int | None
|
User Id if account is marked as a personal wallet. |
icon_id |
str | None
|
Account Icon Id. |
ActionType ¶
ChangeRecord ¶
Drebedengi change record model.
Attributes:
Name | Type | Description |
---|---|---|
revision_id |
int
|
Revision id. |
action_type |
ActionType
|
Action type (update, create, delete). |
change_object_type |
ObjectType
|
changed object type. |
object_id |
int
|
changed object type id. |
date |
datetime
|
change date in user set timezone. |
Currency ¶
Drebedengi currency model.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
id is a unique drebedengi internal identifier for the currency. |
user_name |
str
|
A custom currency name assigned by the user. |
currency_code |
str
|
International 3-leet currency code. |
exchange_rate |
float
|
Current exchange rate from the default currency to the currency. |
budget_family_id |
int
|
User family ID (for multiuser mode) |
is_default |
bool
|
True if the currency is set as default. |
is_autoupdate |
bool
|
True if the currency is configured to fecth exchange rate automatically. |
is_hidden |
bool
|
True if the currency is hidden. |
ExpenseCategory ¶
Drebedengi expense category model.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
id is a unique identifier for the expense category. |
parent_id |
int
|
parent_id is the id of the parent expense category. If the expense category has no parent, parent_id is -1. |
budget_family_id |
int
|
User family ID (for multiuser mode) |
object_type |
ObjectType
|
Always ObjectType.EXPENSE_CATEGORY |
name |
str
|
Name of the expense category. |
is_hidden |
bool
|
True if the expense category is hidden. |
sort |
int
|
Sort order of the expense category. |
IncomeSource ¶
Drebedengi income source model.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
id is a unique identifier for the income source. |
parent_id |
int
|
parent_id is the id of the parent income source. If the income source has no parent, parent_id is -1. |
budget_family_id |
int
|
User family ID (for multiuser mode) |
object_type |
ObjectType
|
Always ObjectType.INCOME_SOURCE |
name |
str
|
Name of the income source. |
is_hidden |
bool
|
True if the income source is hidden. |
sort |
int
|
Sort order of the income source. |
ObjectType ¶
ReportFilterType ¶
ReportGrouping ¶
ReportPeriod ¶
Tag ¶
Drebedengi tag model.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
id is a unique identifier for the tag. |
parent_id |
int
|
parent_id is the id of the parent tag. If the tag has no parent, parent_id is -1. |
budget_family_id |
int
|
User family ID (for multiuser mode) |
name |
str
|
Name of the tag. |
is_hidden |
bool
|
True if the tag is hidden. |
is_shared |
bool
|
True if the tag is shared across family account, otherwise it's user only. |
sort |
int
|
Sort order of the tag. |
Transaction ¶
Drebedengi transaction (aka Record) model.
Attributes:
Name | Type | Description |
---|---|---|
id |
int
|
transaction id |
budget_object_id |
int
|
(int) For expenses - expense category; for incomes - income source; for transfers - source account_id, for exchanges - equal to account_id. |
user_nuid |
int
|
(int) User id. |
budget_family_id |
int
|
(int) Family id for multi-user mode. |
is_loan_transfer |
bool
|
(bool) = Makrs trabsfer transactions that went to a "loan" account. |
operation_date |
datetime
|
(datetime) Operation date in user set timezone. |
currency_id |
int
|
(int) Transaction currency id. |
operation_type |
TransactionType
|
(TransactionType) Transaction type. |
account_id |
int
|
(int) Account id. |
amount |
int
|
(int) Transaction amount in the original currency multiplied by 100 |
comment |
str | None
|
(str | None) Transaction comment. May be empty |
oper_utc_timestamp |
datetime
|
System timestamp, no official documentation. |
group_id |
int
|
Group id if this transaction is part of a group. |