--
-- Host: localhost    Database: oab_gaspar
-- ------------------------------------------------------


--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `color` varchar(7) DEFAULT '#3B82F6',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `idx_slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` VALUES
(1,'Notícias','noticias','Notícias da OAB Gaspar','#3B82F6','2025-11-11 03:59:43'),
(2,'Eventos','eventos','Eventos e atividades','#F59E0B','2025-11-11 03:59:43'),
(3,'Institucional','institucional','Informações institucionais','#8B5CF6','2025-11-11 03:59:43'),
(4,'Serviços','servicos','Serviços oferecidos','#10B981','2025-11-11 03:59:43'),
(5,'Comissões','comissoes','Atividades das comissões','#EC4899','2025-11-11 03:59:43');

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `post_id` int(11) NOT NULL,
  `author_name` varchar(100) NOT NULL,
  `author_email` varchar(100) NOT NULL,
  `content` text NOT NULL,
  `status` enum('pending','approved','rejected') DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_post` (`post_id`),
  KEY `idx_status` (`status`),
  CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `comments`
--


--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `menu_order` int(11) DEFAULT 0,
  `status` enum('draft','published') DEFAULT 'published',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `show_in_menu` tinyint(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `idx_slug` (`slug`),
  KEY `idx_parent` (`parent_id`),
  CONSTRAINT `pages_ibfk_1` FOREIGN KEY (`parent_id`) REFERENCES `pages` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pages`
--

INSERT INTO `pages` VALUES
(2,'Diretoria','diretoria','<h2>Diretoria</h2>\r\n<p>Membros da diretoria...</p>',8,12,'published','2025-11-11 03:59:43','2025-11-11 18:45:16',1),
(3,'Conselheiros','conselheiros','<h2>Conselheiros</h2>\r\n<p>Lista de conselheiros...</p>',8,13,'published','2025-11-11 03:59:43','2025-11-11 18:45:25',1),
(4,'Comissões','comiss-es','<h2>Comiss&otilde;es</h2>\r\n<p>Comiss&otilde;es ativas...</p>',8,15,'published','2025-11-11 03:59:43','2025-11-11 18:45:40',1),
(5,'Contato','contato','<h4><strong><span style=\"font-family: helvetica, arial, sans-serif;\">Sede</span></strong></h4>\r\n<h4><br><span style=\"font-family: verdana, geneva, sans-serif;\">Rua Jakic&eacute;ia de Andrade, 99, em frente ao f&oacute;rum &ndash; Gaspar &ndash; SC 89114-820</span><br><span style=\"font-family: verdana, geneva, sans-serif;\">Fone: (47) 3397-0775 &ndash; E-mail:&nbsp;<a href=\"mailto:subgaspar@oab-sc.org.br\">subgaspar@oab-sc.org.br</a></span><br><span style=\"font-family: verdana, geneva, sans-serif;\">Hor&aacute;rio de Atendimento: 12h &agrave;s 19h</span><br><br><strong><span style=\"font-family: helvetica, arial, sans-serif;\">Sala dos Advogados &ndash; F&oacute;rum de Gaspar</span></strong></h4>\r\n<h4><br><span style=\"font-family: verdana, geneva, sans-serif;\">Rua Prefeito Julio Schramm, n&ordm;33 &ndash; sala 014 &ndash; Sete de Setembro &ndash; Gaspar &ndash; SC &ndash; 89114-738</span><br><span style=\"font-family: verdana, geneva, sans-serif;\">Email:&nbsp;<a href=\"mailto:diligenciaoabgaspar@oab-sc.org.br\">diligenciaoabgaspar@oab-sc.org.br</a></span><br><span style=\"font-family: verdana, geneva, sans-serif;\">Hor&aacute;rio de Funcionamento: De Segunda &agrave; Sexta, das 12:00 &agrave;s 19:00</span></h4>\r\n<h4><span style=\"color: rgb(224, 62, 45);\"><a style=\"color: rgb(224, 62, 45);\" href=\"https://www.oab.org.br/ouvidoria/faleconosco?ehydAtt1w94Hj3CCYDM6jA==\">Ouvidoria</a> </span></h4>',NULL,5,'published','2025-11-11 03:59:43','2025-11-11 21:26:36',1),
(8,'Institucional','institucional','',NULL,1,'published','2025-11-11 17:56:27','2025-11-11 18:01:48',1),
(9,'Gestões','gest-es','<p>TESTE####</p>',8,11,'published','2025-11-11 17:58:25','2025-11-11 18:45:04',1),
(10,'REPRESENTANTES OAB','representantes-oab','',8,14,'published','2025-11-11 18:38:43','2025-11-11 18:45:33',1),
(11,'ATOS OFICIAIS','atos-oficiais','',8,16,'published','2025-11-11 18:39:08','2025-11-11 18:46:06',1),
(12,'Agenda','agenda','<div class=\"tiny-pageembed\"><iframe src=\"https://calendar.google.com/calendar/embed?src=subgaspar%40oab-sc.org.br&amp;amp;ctz=America%2FSao_Paulo\" width=\"1200px\" height=\"891px\" scrolling=\"no\"></iframe></div>',NULL,2,'published','2025-11-11 18:39:30','2025-11-11 21:35:42',1);

--
-- Table structure for table `posts`
--

CREATE TABLE `posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text NOT NULL,
  `excerpt` varchar(500) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `author_id` int(11) NOT NULL,
  `views` int(11) DEFAULT 0,
  `status` enum('draft','published') DEFAULT 'draft',
  `published_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `featured` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `author_id` (`author_id`),
  KEY `idx_slug` (`slug`),
  KEY `idx_status` (`status`),
  KEY `idx_published_at` (`published_at`),
  KEY `idx_category` (`category_id`),
  CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL,
  CONSTRAINT `posts_ibfk_2` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `posts`
--

INSERT INTO `posts` VALUES
(1,'A Comissão OAB por Elas informa os próximos dias','comissao-oab-por-elas-proximos-dias','<p>A Comissão OAB por Elas informa sobre as próximas atividades e eventos programados...</p>','Informações sobre as próximas atividades da Comissão OAB por Elas',NULL,5,1,10,'published','2025-11-11 03:59:43','2025-11-11 03:59:43','2025-11-11 17:35:54',0),
(2,'Laços do Coração - Encontro sobre Adoção','lacos-coracao-encontro-adocao','<p>Evento especial sobre adoção e os laços familiares que transcendem o sangue...</p>','Encontro especial sobre adoção e família',NULL,NULL,1,8,'published','2025-11-11 03:59:43','2025-11-11 03:59:43','2025-11-11 03:59:43',0),
(3,'Solenidade de Entrega de Credencial | 04.11.25','solenidade-entrega-credencial-041125','<p>Cerimônia solene de entrega de credenciais aos novos advogados inscritos...</p>','Cerimônia de entrega de credenciais',NULL,NULL,1,27,'published','2025-11-11 03:59:43','2025-11-11 03:59:43','2025-11-11 04:02:16',0),
(4,'ADV Primavera foi um sucesso!','adv-primavera-sucesso','<p>🌸 O evento ADV Primavera superou todas as expectativas com grande participação...</p>','Evento ADV Primavera teve grande sucesso',NULL,NULL,1,9,'published','2025-11-11 03:59:43','2025-11-11 03:59:43','2025-11-11 03:59:43',0),
(5,'Comissão de Direito Empresarial e Tributário','comissao-direito-empresarial-tributario','<p>A Comissão de Direito Empresarial e Tributário promove debates importantes...</p>','Atividades da Comissão de Direito Empresarial',NULL,5,1,14,'published','2025-11-11 03:59:43','2025-11-11 03:59:43','2025-11-11 03:59:43',0);

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_key` varchar(100) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `setting_key` (`setting_key`),
  KEY `idx_key` (`setting_key`)
) ENGINE=InnoDB AUTO_INCREMENT=155 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` VALUES
(1,'site_maintenance','0','2025-11-11 03:59:43','2025-11-11 03:59:43'),
(2,'posts_per_page','4','2025-11-11 03:59:43','2025-11-11 17:35:04'),
(3,'comments_enabled','1','2025-11-11 03:59:43','2025-11-11 03:59:43'),
(4,'comments_moderation','1','2025-11-11 03:59:43','2025-11-11 03:59:43'),
(5,'site_title','OAB Gaspar','2025-11-11 17:02:07','2025-11-11 17:35:04'),
(6,'site_description','Ordem dos Advogados do Brasil - Subseção Gaspar','2025-11-11 17:02:07','2025-11-11 17:35:04'),
(7,'site_keywords','OAB, Gaspar, Advogados, Direito','2025-11-11 17:02:07','2025-11-11 17:02:07'),
(8,'contact_email','subgaspar@oab-sc.org.br','2025-11-11 17:02:07','2025-11-11 17:37:54'),
(9,'contact_phone','(47) 3397-0775','2025-11-11 17:02:07','2025-11-11 17:37:54'),
(10,'contact_address','Rua Paschoal Apóstolo Pítsica, 4860 - Agronômica, Florianópolis - SC, 88025-255','2025-11-11 17:02:07','2025-11-11 17:35:04'),
(11,'facebook_url','https://www.facebook.com/oabsc','2025-11-11 17:02:07','2025-11-11 17:35:04'),
(12,'instagram_url','https://www.instagram.com/oabsantacatarina','2025-11-11 17:02:07','2025-11-11 17:35:04'),
(13,'twitter_url','https://twitter.com/oabsc','2025-11-11 17:02:07','2025-11-11 17:35:04'),
(14,'linkedin_url','','2025-11-11 17:02:07','2025-11-11 17:02:07'),
(16,'maintenance_mode','1','2025-11-11 17:02:07','2025-11-11 17:36:01'),
(17,'allow_comments','0','2025-11-11 17:02:07','2025-11-11 17:19:50'),
(18,'google_analytics','','2025-11-11 17:02:07','2025-11-11 17:02:07'),
(19,'footer_text','© 2025 ~ Ordem dos Advogados - Santa Catarina. Todos os direitos reservados.','2025-11-11 17:02:07','2025-11-11 17:35:04');


