-- MySQL schema
CREATE TABLE IF NOT EXISTS products (
  id INT AUTO_INCREMENT PRIMARY KEY,
  source_code VARCHAR(32) UNIQUE,
  title VARCHAR(512),
  description MEDIUMTEXT,
  price_jpy INT DEFAULT 0,
  price_usd DECIMAL(10,2) DEFAULT 0,
  images_json JSON,
  source_url VARCHAR(512),
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
  updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
