(feat) balance
This commit is contained in:
parent
779ae4d498
commit
aeb9514aa3
15 changed files with 461 additions and 26 deletions
22
.sqlx/query-c76f312865fd8d9dd42b09448be7a81c218f77f35fd20e28bf178bc2d8c92d49.json
generated
Normal file
22
.sqlx/query-c76f312865fd8d9dd42b09448be7a81c218f77f35fd20e28bf178bc2d8c92d49.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT consent_id\n FROM user_consents\n WHERE bank_code = $1 AND expires_at > NOW() AND status = 'active'\n LIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "consent_id",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "c76f312865fd8d9dd42b09448be7a81c218f77f35fd20e28bf178bc2d8c92d49"
|
||||
}
|
||||
34
.sqlx/query-ec6e46778012d093e99364fc0e46cbbe03f9a54e22f02837ccd6332ebe66d4cc.json
generated
Normal file
34
.sqlx/query-ec6e46778012d093e99364fc0e46cbbe03f9a54e22f02837ccd6332ebe66d4cc.json
generated
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n SELECT amount, currency, balance_type\n FROM balances\n WHERE account_id = $1\n ORDER BY date_time DESC\n LIMIT 1\n ",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"ordinal": 0,
|
||||
"name": "amount",
|
||||
"type_info": "Text"
|
||||
},
|
||||
{
|
||||
"ordinal": 1,
|
||||
"name": "currency",
|
||||
"type_info": "Varchar"
|
||||
},
|
||||
{
|
||||
"ordinal": 2,
|
||||
"name": "balance_type",
|
||||
"type_info": "Varchar"
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Text"
|
||||
]
|
||||
},
|
||||
"nullable": [
|
||||
false,
|
||||
false,
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "ec6e46778012d093e99364fc0e46cbbe03f9a54e22f02837ccd6332ebe66d4cc"
|
||||
}
|
||||
24
.sqlx/query-ef51346809b942caa815860988e496f4ad93973efd79c8fd0ddd9861b26a6357.json
generated
Normal file
24
.sqlx/query-ef51346809b942caa815860988e496f4ad93973efd79c8fd0ddd9861b26a6357.json
generated
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n INSERT INTO transactions \n (transaction_id, account_id, bank_code, amount, currency, credit_debit_indicator, \n status, booking_date_time, value_date_time, transaction_information, bank_transaction_code)\n VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)\n ON CONFLICT (transaction_id, bank_code)\n DO NOTHING\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Varchar",
|
||||
"Varchar",
|
||||
"Varchar",
|
||||
"Text",
|
||||
"Varchar",
|
||||
"Varchar",
|
||||
"Varchar",
|
||||
"Timestamptz",
|
||||
"Timestamptz",
|
||||
"Text",
|
||||
"Varchar"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "ef51346809b942caa815860988e496f4ad93973efd79c8fd0ddd9861b26a6357"
|
||||
}
|
||||
18
.sqlx/query-f486b903acc5ff7d9adbb0be711fb66876a3190ab7c8e382fb453a8fbf4db77e.json
generated
Normal file
18
.sqlx/query-f486b903acc5ff7d9adbb0be711fb66876a3190ab7c8e382fb453a8fbf4db77e.json
generated
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"db_name": "PostgreSQL",
|
||||
"query": "\n INSERT INTO balances \n (account_id, balance_type, amount, currency, date_time)\n VALUES ($1, $2, $3, $4, $5)\n ON CONFLICT (account_id, balance_type)\n DO UPDATE SET amount = $3, date_time = $5\n ",
|
||||
"describe": {
|
||||
"columns": [],
|
||||
"parameters": {
|
||||
"Left": [
|
||||
"Varchar",
|
||||
"Varchar",
|
||||
"Text",
|
||||
"Varchar",
|
||||
"Timestamptz"
|
||||
]
|
||||
},
|
||||
"nullable": []
|
||||
},
|
||||
"hash": "f486b903acc5ff7d9adbb0be711fb66876a3190ab7c8e382fb453a8fbf4db77e"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue