-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 18, 2024 at 06:06 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.0.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!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 */;

--
-- Database: `db_callv3mkt`
--

-- --------------------------------------------------------

--
-- Table structure for table `distributed_numbers`
--

CREATE TABLE `distributed_numbers` (
  `id` int(11) NOT NULL,
  `marketing_id` int(11) NOT NULL,
  `phone_number` varchar(20) NOT NULL,
  `pressed_button` char(1) NOT NULL,
  `status` varchar(20) NOT NULL,
  `whatsapp_clicked` tinyint(1) DEFAULT 0,
  `whatsapp_clicked_at` datetime DEFAULT NULL,
  `note` text DEFAULT NULL,
  `nd_status` enum('active','inactive') DEFAULT 'inactive',
  `original_call_date` datetime NOT NULL,
  `distributed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `distributed_numbers`
--

INSERT INTO `distributed_numbers` (`id`, `marketing_id`, `phone_number`, `pressed_button`, `status`, `whatsapp_clicked`, `whatsapp_clicked_at`, `note`, `nd_status`, `original_call_date`, `distributed_at`, `updated_at`) VALUES
(1, 1, '+6281219008008', '1', 'Success', 1, '2024-12-18 23:00:35', 'Customer tertarik dengan produk lainnya', 'active', '2024-12-18 01:07:39', '2024-12-17 18:11:49', '2024-12-18 16:00:35'),
(2, 3, '+6282166001008', '1', 'Success', 1, '2024-12-18 22:54:57', 'Belum ada respon apapun', 'inactive', '2024-12-18 01:07:44', '2024-12-17 18:11:49', '2024-12-18 15:55:13');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `distributed_numbers`
--
ALTER TABLE `distributed_numbers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_marketing_phone` (`marketing_id`,`phone_number`),
  ADD KEY `idx_status` (`status`),
  ADD KEY `idx_whatsapp_clicked` (`whatsapp_clicked`),
  ADD KEY `idx_nd_status` (`nd_status`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `distributed_numbers`
--
ALTER TABLE `distributed_numbers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
COMMIT;

/*!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 */;
