/*M!999999\- enable the sandbox mode */ 
-- MariaDB dump 10.19  Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1    Database: chatbot_db
-- ------------------------------------------------------
-- Server version	10.11.14-MariaDB-0+deb12u2

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `contacts`
--

DROP TABLE IF EXISTS `contacts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `contacts` (
  `phone` varchar(50) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `saved_name` varchar(255) DEFAULT NULL,
  `is_my_contact` tinyint(1) DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `contacts`
--

LOCK TABLES `contacts` WRITE;
/*!40000 ALTER TABLE `contacts` DISABLE KEYS */;
/*!40000 ALTER TABLE `contacts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `message_queue`
--

DROP TABLE IF EXISTS `message_queue`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `message_queue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `target_number` varchar(50) NOT NULL,
  `message` text NOT NULL,
  `status` varchar(20) DEFAULT 'pending',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `message_queue`
--

LOCK TABLES `message_queue` WRITE;
/*!40000 ALTER TABLE `message_queue` DISABLE KEYS */;
/*!40000 ALTER TABLE `message_queue` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `messages_log`
--

DROP TABLE IF EXISTS `messages_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `messages_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source_number` varchar(50) NOT NULL,
  `target_number` varchar(50) NOT NULL,
  `message_content` text DEFAULT NULL,
  `direction` varchar(20) DEFAULT NULL,
  `has_media` tinyint(1) DEFAULT 0,
  `status` varchar(50) DEFAULT 'SENT',
  `error_log` text DEFAULT NULL,
  `timestamp` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `messages_log`
--

LOCK TABLES `messages_log` WRITE;
/*!40000 ALTER TABLE `messages_log` DISABLE KEYS */;
INSERT INTO `messages_log` VALUES
(1,'628113936644@c.us','6281703806655','info router semua','INCOMING',0,'SENT',NULL,'2026-01-10 00:26:15'),
(2,'6281703806655','628113936644@c.us','','OUTGOING',0,'SENT',NULL,'2026-01-10 00:26:18'),
(3,'628113936644@c.us','6281703806655','cek router 1','INCOMING',0,'SENT',NULL,'2026-01-10 00:26:36'),
(4,'6281703806655','628113936644@c.us','Halo Admin! Berikut informasi Router 1:\n- CPU Load: 10%\n- Uptime: 1 minggu 3 hari 17 jam 46 menit 15 detik\n- Version: 7.20.6 (stable)','OUTGOING',0,'SENT',NULL,'2026-01-10 00:26:40'),
(5,'628113936644@c.us','6281703806655','cek traffic vlan88','INCOMING',0,'SENT',NULL,'2026-01-10 00:28:23'),
(6,'6281703806655','628113936644@c.us','Halo Admin!\n\nBerikut adalah informasi traffic untuk interface vlan88:\n\n**Router 1 - vlan_88_PtP_Dell:**\n- Rx: 1.47 Gbps\n- Tx: 103.34 Mbps\n\n**Router 3 - vlan_888:**\n- Rx: 48.93 Mbps\n- Tx: 150.63 Mbps','OUTGOING',0,'SENT',NULL,'2026-01-10 00:28:30'),
(7,'628113936644@c.us','6281703806655','berapa jumlah pelanggan','INCOMING',0,'SENT',NULL,'2026-01-10 01:12:35'),
(8,'6281703806655','628113936644@c.us','Maaf, saat ini saya tidak dapat terhubung ke database.','OUTGOING',0,'SENT',NULL,'2026-01-10 01:12:49'),
(9,'628113936644@c.us','6281703806655','berapa jumlah pelanggan','INCOMING',0,'SENT',NULL,'2026-01-10 01:15:32'),
(10,'6281703806655','628113936644@c.us','Maaf, saat ini saya tidak dapat terhubung ke database.','OUTGOING',0,'SENT',NULL,'2026-01-10 01:15:46'),
(11,'628113936644@c.us','6281703806655','berapa jumlah pelanggan','INCOMING',0,'SENT',NULL,'2026-01-10 01:21:48'),
(12,'6281703806655','628113936644@c.us','Halo Admin! Jumlah pelanggan adalah 1128.\n','OUTGOING',0,'SENT',NULL,'2026-01-10 01:22:01'),
(13,'628113936644@c.us','6281703806655','info  I GUSTI KETUT PUTRA ADNYANA','INCOMING',0,'SENT',NULL,'2026-01-10 01:22:23'),
(14,'6281703806655','628113936644@c.us','Berikut adalah informasi pelanggan yang Anda minta:\n\n- Name: I GUSTI KETUT PUTRA ADNYANA\n- No Services: 1100029\n- Email: putraadnyana212@dimensitech.my.id\n- Due Date: 10\n- Address: palak\n- No WA: 628970266173\n- User Mikrotik: 1100029\n- Router: 1\n- Nama Paket: PAKET GOLD UPTO 30 Mbps / 220k\n','OUTGOING',0,'SENT',NULL,'2026-01-10 01:22:33'),
(15,'628113936644@c.us','6281703806655','cek traffic vlan88','INCOMING',0,'SENT',NULL,'2026-01-10 01:23:52'),
(16,'6281703806655','628113936644@c.us','Halo Admin! Berikut adalah informasi traffic untuk vlan88:\n\nRouter 1 - Interface vlan_88_PtP_Dell:\n- Rx: 1.39 Gbps\n- Tx: 112.23 Mbps\n\nRouter 3 - Interface vlan_888:\n- Rx: 9.44 Mbps\n- Tx: 149.12 Mbps','OUTGOING',0,'SENT',NULL,'2026-01-10 01:23:58'),
(17,'628113936644@c.us','6281703806655','Cek traffic i wayan soma bali putra','INCOMING',0,'SENT',NULL,'2026-01-10 01:24:27'),
(18,'6281703806655','628113936644@c.us','Maaf, terjadi kesalahan dalam menghubungi database. Mohon coba lagi nanti.\n','OUTGOING',0,'SENT',NULL,'2026-01-10 01:24:41');
/*!40000 ALTER TABLE `messages_log` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-01-10  9:26:30
