Agenda, Agendador, Configurações

This commit is contained in:
Leonardo
2026-03-12 08:58:36 -03:00
parent f733db8436
commit f4b185ae17
197 changed files with 33405 additions and 6507 deletions

View File

@@ -0,0 +1,17 @@
create table if not exists public.subscriptions (
id uuid primary key default gen_random_uuid(),
user_id uuid not null references auth.users(id) on delete cascade,
plan_key text not null,
interval text not null check (interval in ('month','year')),
status text not null check (status in ('active','canceled','past_due','trial')) default 'active',
started_at timestamptz not null default now(),
current_period_start timestamptz not null default now(),
current_period_end timestamptz null,
canceled_at timestamptz null,
source text not null default 'manual',
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
create index if not exists subscriptions_user_id_idx on public.subscriptions(user_id);
create index if not exists subscriptions_status_idx on public.subscriptions(status);