-- http://www.phpmyadmin.net
--




--
-- Database: `dinas_pa`
--

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

--
-- Table structure for table `assesment_klient`
--

CREATE TABLE `assesment_klient` (
  `ak_id` int(11) NOT NULL,
  `petugas_id` int(11) NOT NULL,
  `klient_id` int(11) NOT NULL,
  `layanan_id` int(11) NOT NULL,
  `nomor_registrasi` varchar(50) NOT NULL,
  `tgl_kunjungan` date NOT NULL,
  `status_konseling` varchar(100) NOT NULL,
  `hasil_wawancara` text NOT NULL,
  `hasil_observasi` text NOT NULL,
  `rekomendasi` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `assesment_klient`
--

INSERT INTO `assesment_klient` (`ak_id`, `petugas_id`, `klient_id`, `layanan_id`, `nomor_registrasi`, `tgl_kunjungan`, `status_konseling`, `hasil_wawancara`, `hasil_observasi`, `rekomendasi`) VALUES
(3, 1, 7, 1, '', '0000-00-00', '', '', '', '');

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

--
-- Table structure for table `chat`
--

CREATE TABLE `chat` (
  `chat_id` int(11) NOT NULL,
  `layanan_id` int(11) NOT NULL,
  `chat_pengirim` int(11) NOT NULL,
  `chat_penerima` int(11) NOT NULL,
  `chat_isi` text NOT NULL,
  `chat_waktu` datetime NOT NULL,
  `chat_status` int(11) NOT NULL,
  `chat_tipe` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chat`
--

INSERT INTO `chat` (`chat_id`, `layanan_id`, `chat_pengirim`, `chat_penerima`, `chat_isi`, `chat_waktu`, `chat_status`, `chat_tipe`) VALUES
(341, 1, 7, 1, 'hallooooo', '2020-07-15 10:51:44', 1, 'text'),
(342, 1, 7, 1, '20241.pdf', '2020-07-15 10:52:43', 1, 'file'),
(343, 1, 1, 7, 'ada yg bisa dibaantu', '2020-07-15 10:52:55', 1, 'text'),
(344, 1, 7, 1, 'bgm cara buat KIA', '2020-07-15 10:53:12', 1, 'text'),
(345, 2, 8, 1, 'haiiii', '2020-07-15 11:02:09', 1, 'text'),
(346, 2, 8, 1, 'haiiii', '2020-07-15 11:02:09', 1, 'text'),
(347, 1, 1, 8, 'hy', '2020-07-15 11:02:33', 1, 'text'),
(348, 5, 1, 8, 'hy', '2020-07-15 11:03:55', 1, 'text'),
(349, 1, 1, 9, 'p', '2020-07-15 13:38:03', 1, 'text'),
(350, 1, 9, 7, 'Yyy', '2020-07-15 13:39:47', 0, 'text'),
(351, 1, 9, 1, 'P', '2020-07-15 13:41:59', 1, 'text'),
(352, 1, 9, 1, 'Fido', '2020-07-15 13:43:27', 1, 'text'),
(353, 1, 1, 9, '<img class=''pesan-gambar'' src=''../gambar/chat/4917.jpg''>', '2020-07-15 13:44:24', 1, 'gambar'),
(354, 1, 1, 9, '<img class=''pesan-gambar'' src=''../gambar/chat/17807.jpg''>', '2020-07-15 13:44:30', 1, 'gambar'),
(355, 1, 1, 9, 'hy', '2020-07-15 13:46:05', 1, 'text'),
(356, 1, 9, 1, '<img class=''pesan-gambar'' src=''../gambar/chat/19196.jpg''>', '2020-07-15 13:50:54', 1, 'gambar'),
(357, 1, 9, 1, '<img class=''pesan-gambar'' src=''../gambar/chat/9272.jpg''>', '2020-07-15 13:51:49', 1, 'gambar'),
(358, 5, 1, 9, 'test', '2020-07-16 06:13:49', 0, 'text');

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

--
-- Table structure for table `layanan`
--

CREATE TABLE `layanan` (
  `layanan_id` int(11) NOT NULL,
  `nama_layanan` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `layanan`
--

INSERT INTO `layanan` (`layanan_id`, `nama_layanan`) VALUES
(1, 'Hak Sipil'),
(2, 'Pendidikan'),
(3, 'Informasi Layak Anak'),
(4, 'Konseling Keluarga dan Pengasuhan'),
(5, 'Kesehatan');

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

--
-- Table structure for table `online`
--

CREATE TABLE `online` (
  `online_id` int(11) NOT NULL,
  `online_pengirim` int(11) NOT NULL,
  `online_penerima` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `assesment_klient`
--
ALTER TABLE `assesment_klient`
  ADD PRIMARY KEY (`ak_id`);

--
-- Indexes for table `chat`
--
ALTER TABLE `chat`
  ADD PRIMARY KEY (`chat_id`);

--
-- Indexes for table `layanan`
--
ALTER TABLE `layanan`
  ADD PRIMARY KEY (`layanan_id`);

--
-- Indexes for table `online`
--
ALTER TABLE `online`
  ADD PRIMARY KEY (`online_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `assesment_klient`
--
ALTER TABLE `assesment_klient`
  MODIFY `ak_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `chat`
--
ALTER TABLE `chat`
  MODIFY `chat_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=359;
--
-- AUTO_INCREMENT for table `layanan`
--
ALTER TABLE `layanan`
  MODIFY `layanan_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `online`
--
ALTER TABLE `online`
  MODIFY `online_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;
