

CREATE TABLE products (
  id INT AUTO_INCREMENT PRIMARY KEY,
  name VARCHAR(255),
  price DECIMAL(10,2),
  stock INT DEFAULT 0,
  img1 VARCHAR(255),
  img2 VARCHAR(255)
);

CREATE TABLE orders (
  id INT AUTO_INCREMENT PRIMARY KEY,
  booking_no VARCHAR(50),
  fullname VARCHAR(255),
  phone VARCHAR(50),
  address TEXT,
  zipcode VARCHAR(10),
  receive_method VARCHAR(255),
  total DECIMAL(10,2),
  status VARCHAR(100),
  slip VARCHAR(255),
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE order_items (
  id INT AUTO_INCREMENT PRIMARY KEY,
  order_id INT,
  product_id INT,
  qty INT,
  price DECIMAL(10,2)
);