CREATE TABLE IF NOT EXISTS admin_app_banners (
  id BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
  app_code VARCHAR(32) NOT NULL DEFAULT 'lalu',
  cover_url VARCHAR(1024) NOT NULL,
  banner_type VARCHAR(16) NOT NULL,
  param VARCHAR(2048) NOT NULL DEFAULT '',
  status VARCHAR(24) NOT NULL DEFAULT 'active',
  platform VARCHAR(24) NOT NULL,
  sort_order INT NOT NULL DEFAULT 0,
  region_id BIGINT NOT NULL DEFAULT 0,
  country_code VARCHAR(8) NOT NULL DEFAULT '',
  description VARCHAR(255) NOT NULL DEFAULT '',
  created_at_ms BIGINT NOT NULL,
  updated_at_ms BIGINT NOT NULL,
  INDEX idx_admin_app_banners_app_sort (app_code, status, sort_order, id),
  INDEX idx_admin_app_banners_scope (app_code, platform, region_id, country_code)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
