
-- SQL sample for Postgres
CREATE TABLE IF NOT EXISTS users (
  id SERIAL PRIMARY KEY,
  email TEXT UNIQUE,
  name TEXT,
  password_hash TEXT,
  role TEXT DEFAULT 'user',
  created_at TIMESTAMP DEFAULT now()
);
CREATE TABLE IF NOT EXISTS full_movies (
  id SERIAL PRIMARY KEY,
  title TEXT UNIQUE,
  language TEXT,
  thumbnail TEXT,
  source TEXT,
  source_url TEXT,
  duration TEXT,
  producer_id INTEGER,
  created_at TIMESTAMP DEFAULT now()
);
CREATE TABLE IF NOT EXISTS payments (
  id SERIAL PRIMARY KEY,
  provider TEXT,
  provider_order_id TEXT,
  status TEXT,
  user_id INTEGER,
  amount NUMERIC,
  currency TEXT,
  payload JSONB,
  created_at TIMESTAMP DEFAULT now()
);
