Supabase: Таблицы и функции (автогенерация)
ER-диаграмма
erDiagram
app_config {
"text" key
"jsonb" value_json
timestamp updated_at
}
payment_messages {
"uuid" id
"text" provider
"text" charge_id
bigint chat_id
bigint message_id
timestamp created_at
timestamp updated_at
}
payments {
"uuid" id
"uuid" user_id
"text" provider
"text" charge_id
"text" currency
integer amount
"text" product_kind
"text" product_code
integer credits_added
timestamp created_at
}
promo_codes {
"text" code
"text" type
bigint value
"text" plan
integer max_uses
integer used_count
integer per_user_limit
timestamp expires_at
boolean active
timestamp created_at
}
promo_redemptions {
"uuid" id
"text" code
"uuid" user_id
timestamp created_at
}
seedance_price_templates {
"text" tier
"text" resolution
"text" ratio
integer width
integer height
integer fps
integer duration
integer usage_tokens
numeric(10,4) price_usd
}
tasks {
"uuid" id
"uuid" user_id
"text" tool
"text" model
numeric(12,3) cost
"text" status
"jsonb" meta
"text" comet_task_id
timestamp created_at
timestamp finished_at
timestamp updated_at
}
tool_flat_prices {
"text" tool
"text" feature
numeric(10,3) credits_per_job
timestamp effective_from
timestamp effective_to
}
tool_price_multipliers {
"text" tool
"text" feature
"text" param
"text" value
numeric(10,3) factor
timestamp effective_from
timestamp effective_to
}
tools {
"text" code
"text" title
}
users {
"uuid" id
bigint tg_user_id
"text" tg_username
"text" plan
timestamp plan_until
timestamp created_at
"text" lang
}
wallet_tx {
"uuid" id
"uuid" user_id
"text" kind
numeric(12,3) amount
"text" model
"jsonb" meta
timestamp created_at
}
wallets {
"uuid" user_id
numeric(12,3) balance
timestamp updated_at
}
payments }o--|| users : fk
promo_redemptions }o--|| promo_codes : fk
promo_redemptions }o--|| users : fk
tasks }o--|| users : fk
tool_flat_prices }o--|| tools : fk
tool_price_multipliers }o--|| tools : fk
wallet_tx }o--|| users : fk
wallets }o--|| users : fk
Таблицы
Функции