1594dc9426d710eb0fc78eef3392a3d2ee3637a3
- slug_disponivel(p_slug) -> {ok, motivo} (formato + reservados + uso),
chamavel por anon (signup acontece antes do login)
- auto_provision_free_tenant(p_slug_override): le raw_user_meta_data, cria
tenant (slug escolhido OU auto), vira master, clona schema, cria subscription
gratuita ativa (XOR clinic->tenant_id / therapist->user_id). Idempotente.
- processar_pos_signup(): cria intent SO pro caminho pago, na tabela real por
target (a view subscription_intents nao propaga user_id). Idempotente.
- testado em ROLLBACK: clinica + terapeuta, provision+idempotencia+intents OK
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sakai is an application template for Vue based on the create-vue, the recommended way to start a Vite-powered Vue projects.
Visit the documentation to get started.
Description
Languages
Vue
61.1%
PLpgSQL
17.8%
JavaScript
15.9%
HTML
2.6%
TypeScript
2.3%
Other
0.3%