-- Supabase Schema for THE HYRIZT CO.
-- 1. Inventory Table
create table if not exists public.inventory (
id uuid default gen_random_uuid() primary key,
product_name text unique not null,
stock integer not null default 5,
category text not null,
price numeric(10,2) default 10.00,
updated_at timestamptz default now()
);
-- 2. Orders Table
create table if not exists public.orders (
id uuid default gen_random_uuid() primary key,
order_ref text unique not null,
customer_name text not null,
customer_phone text not null,
customer_address text not null,
delivery_notes text,
payment_method text not null,
items jsonb not null,
total_amount numeric(10,2) not null,
status text default 'pending_payment',
created_at timestamptz default now()
);
-- Realtime & RLS enabled
alter publication supabase_realtime add table inventory, orders;
-- [Full 50-perfume seed schema available in supabase_schema.sql]