-- Run once if your database was created before home_banners existed.
-- mysql -u USER -p DB_NAME < database/add_home_banners.sql

CREATE TABLE IF NOT EXISTS home_banners (
  id INT UNSIGNED NOT NULL AUTO_INCREMENT,
  eyebrow VARCHAR(128) NOT NULL DEFAULT 'VN PRINT',
  headline VARCHAR(255) NOT NULL,
  subtext TEXT NOT NULL,
  image_path VARCHAR(512) NOT NULL DEFAULT '',
  primary_label VARCHAR(128) NOT NULL DEFAULT 'View services',
  primary_link VARCHAR(512) NOT NULL DEFAULT '/products',
  secondary_label VARCHAR(128) NOT NULL DEFAULT '',
  secondary_link VARCHAR(512) NOT NULL DEFAULT '',
  sort_order INT NOT NULL DEFAULT 0,
  is_active TINYINT(1) NOT NULL DEFAULT 1,
  created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
  updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (id),
  KEY idx_home_banners_active_sort (is_active, sort_order, id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
