You've already forked AstralRinth
forked from didirus/AstralRinth
* Implement subscription crediting * chore: query cache, clippy, fmt * Improve code, improve query for next open charge * chore: query cache, clippy, fmt * Move server ID copy button up * Node + region crediting * Make it less ugly * chore: query cache, clippy, fmt * Bugfixes * Fix lint * Adjust migration * Adjust migration * Remove billing change * Move DEFAULT_CREDIT_EMAIL_MESSAGE to utils.ts * Lint * Merge * bump clickhouse, disable validation * tombi fmt * Update cargo lock
143 lines
3.7 KiB
JSON
143 lines
3.7 KiB
JSON
{
|
|
"db_name": "PostgreSQL",
|
|
"query": "\n SELECT\n charges.id, charges.user_id, charges.price_id, charges.amount, charges.currency_code, charges.status, charges.due, charges.last_attempt,\n charges.charge_type, charges.subscription_id, charges.tax_amount, charges.tax_platform_id,\n -- Workaround for https://github.com/launchbadge/sqlx/issues/3336\n charges.subscription_interval AS \"subscription_interval?\",\n charges.payment_platform,\n charges.payment_platform_id AS \"payment_platform_id?\",\n charges.parent_charge_id AS \"parent_charge_id?\",\n charges.net AS \"net?\",\n\t\t\t\tcharges.tax_last_updated AS \"tax_last_updated?\",\n\t\t\t\tcharges.tax_drift_loss AS \"tax_drift_loss?\",\n charges.tax_transaction_version AS \"tax_transaction_version?\",\n charges.tax_platform_accounting_time AS \"tax_platform_accounting_time?\"\n FROM charges\n WHERE\n\t\t\t subscription_id = $1\n\t\t\t AND (status = 'open' OR status = 'expiring' OR status = 'cancelled' OR status = 'failed')\n\t\t\tORDER BY due ASC LIMIT 1",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"ordinal": 0,
|
|
"name": "id",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 1,
|
|
"name": "user_id",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 2,
|
|
"name": "price_id",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 3,
|
|
"name": "amount",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 4,
|
|
"name": "currency_code",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 5,
|
|
"name": "status",
|
|
"type_info": "Varchar"
|
|
},
|
|
{
|
|
"ordinal": 6,
|
|
"name": "due",
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"ordinal": 7,
|
|
"name": "last_attempt",
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"ordinal": 8,
|
|
"name": "charge_type",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 9,
|
|
"name": "subscription_id",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 10,
|
|
"name": "tax_amount",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 11,
|
|
"name": "tax_platform_id",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 12,
|
|
"name": "subscription_interval?",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 13,
|
|
"name": "payment_platform",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 14,
|
|
"name": "payment_platform_id?",
|
|
"type_info": "Text"
|
|
},
|
|
{
|
|
"ordinal": 15,
|
|
"name": "parent_charge_id?",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 16,
|
|
"name": "net?",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 17,
|
|
"name": "tax_last_updated?",
|
|
"type_info": "Timestamptz"
|
|
},
|
|
{
|
|
"ordinal": 18,
|
|
"name": "tax_drift_loss?",
|
|
"type_info": "Int8"
|
|
},
|
|
{
|
|
"ordinal": 19,
|
|
"name": "tax_transaction_version?",
|
|
"type_info": "Int4"
|
|
},
|
|
{
|
|
"ordinal": 20,
|
|
"name": "tax_platform_accounting_time?",
|
|
"type_info": "Timestamptz"
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Left": [
|
|
"Int8"
|
|
]
|
|
},
|
|
"nullable": [
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
false,
|
|
true,
|
|
false,
|
|
true,
|
|
false,
|
|
true,
|
|
true,
|
|
false,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true,
|
|
true
|
|
]
|
|
},
|
|
"hash": "91866517bf34fb8bf31a7a49832b18fca60c293ad349eaec07b573d22a28301c"
|
|
}
|