implementando openAI y busqueda de productos en woo

This commit is contained in:
Lucas Tettamanti
2026-01-05 11:15:56 -03:00
parent 829823ac3d
commit dab52492b4
9 changed files with 570 additions and 48 deletions

View File

@@ -0,0 +1,21 @@
-- migrate:up
create table if not exists woo_products_cache (
tenant_id uuid not null references tenants(id) on delete cascade,
woo_product_id integer not null,
name text not null,
sku text,
price numeric(12,2),
currency text,
refreshed_at timestamptz not null default now(),
payload jsonb not null default '{}'::jsonb,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now(),
primary key (tenant_id, woo_product_id)
);
create index if not exists woo_products_cache_tenant_name_idx on woo_products_cache (tenant_id, lower(name));
create index if not exists woo_products_cache_tenant_sku_idx on woo_products_cache (tenant_id, sku);
-- migrate:down
drop table if exists woo_products_cache;