Unify Ads/RRSS approval flow and add personalized Meta creative regen.

Agency validates first then client; Meta copy is 5+5+1 with on-image vs feed layers, emojis on feed, and partial v2 by image/hook/support/copy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
4Ventures
2026-10-13 13:17:36 +02:00
parent 4bc9ed7820
commit 46492c3873
26 changed files with 2014 additions and 204 deletions

View File

@@ -1,6 +1,6 @@
-- Agency-only scheduling for editorial creativities.
-- aprobado + scheduled_at → cron publishes IG/FB; status becomes publicado.
-- Idempotent.
-- aprobada + scheduled_at → cron publishes IG/FB; status becomes publicada.
-- Idempotent. (Estados canónicos: sql/approval_status_unify.sql)
alter table public.creative_pipeline
add column if not exists scheduled_at timestamptz;
@@ -38,7 +38,7 @@ alter table public.creative_pipeline
create index if not exists creative_pipeline_due_publish_idx
on public.creative_pipeline (tenant_id, scheduled_at)
where status = 'aprobado' and publish_status in ('idle', 'queued', 'failed');
where status = 'aprobada' and publish_status in ('idle', 'queued', 'failed');
create index if not exists creative_pipeline_scheduled_at_idx
on public.creative_pipeline (tenant_id, scheduled_at)