CREATE TABLE IF NOT EXISTS products (
  id VARCHAR(255) PRIMARY KEY,
  name VARCHAR(255) NOT NULL,
  description TEXT,
  price INT NOT NULL,
  image VARCHAR(1000),
  category VARCHAR(255),
  ingredients JSON,
  benefits JSON,
  usageGuide TEXT,
  stock INT DEFAULT 0,
  isBestSeller BOOLEAN DEFAULT FALSE,
  createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS categories (
  id VARCHAR(255) PRIMARY KEY,
  label VARCHAR(255) NOT NULL,
  img VARCHAR(1000)
);

CREATE TABLE IF NOT EXISTS orders (
  id VARCHAR(255) PRIMARY KEY,
  customerName VARCHAR(255),
  customerEmail VARCHAR(255),
  customerPhone VARCHAR(255),
  deliveryAddress TEXT,
  items JSON,
  totalAmount INT,
  status VARCHAR(50) DEFAULT 'pending',
  paymentMethod VARCHAR(50),
  paymentStatus VARCHAR(50) DEFAULT 'unpaid',
  createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS bookings (
  id VARCHAR(255) PRIMARY KEY,
  name VARCHAR(255),
  email VARCHAR(255),
  phone VARCHAR(255),
  date VARCHAR(50),
  time VARCHAR(50),
  concerns TEXT,
  status VARCHAR(50) DEFAULT 'pending',
  createdAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
