CREATE DATABASE IF NOT EXISTS myadmonkeydata
  CHARACTER SET utf8mb4
  COLLATE utf8mb4_unicode_ci;

USE myadmonkeydata;

CREATE TABLE IF NOT EXISTS services (
  id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(160) NOT NULL,
  description TEXT NOT NULL,
  sort_order INT UNSIGNED NOT NULL DEFAULT 0,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS projects (
  id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  name VARCHAR(180) NOT NULL,
  project_type VARCHAR(120) NOT NULL,
  summary TEXT NOT NULL,
  technology VARCHAR(180) NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS enquiries (
  id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  name VARCHAR(120) NOT NULL,
  email VARCHAR(160) NOT NULL,
  phone VARCHAR(30) DEFAULT NULL,
  company VARCHAR(160) DEFAULT NULL,
  project_type VARCHAR(80) NOT NULL,
  message TEXT NOT NULL,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

INSERT INTO services (title, description, sort_order) VALUES
('News Portal Development', 'Fast responsive news websites with categories, author pages, article templates, search, and ad-ready layouts.', 1),
('E-Paper Website', 'Digital newspaper and magazine pages with editions, archive, page previews, and date filters.', 2),
('Admin Dashboard', 'Simple CMS dashboard for articles, breaking news, media uploads, menus, and publication workflow.', 3),
('SEO and Performance', 'Schema-ready pages, clean structure, optimized assets, and speed-focused PHP development.', 4);

INSERT INTO projects (name, project_type, summary, technology) VALUES
('City News Portal', 'Daily News Website', 'A district-level news platform with breaking ticker, category sections, featured stories, and advertisement spaces.', 'PHP, MySQL, HTML, CSS'),
('Hindi E-Paper Platform', 'Digital Newspaper', 'An e-paper style archive with editions, date filters, page previews, and subscription inquiry flow.', 'PHP, MySQL, Bootstrap'),
('Media House CMS', 'Content Management', 'A backend concept for publishing stories, managing authors, categories, videos, and web banners.', 'PHP, MySQL, Admin UI');
