-- 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;

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

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `user_id` int(11) NOT NULL,
  `user_nomorhp` varchar(20) NOT NULL,
  `user_nama` varchar(255) NOT NULL,
  `user_tempatlahir` varchar(255) NOT NULL,
  `user_tanggallahir` date NOT NULL,
  `user_namaorangtua` varchar(255) NOT NULL,
  `user_nomorkk` varchar(25) NOT NULL,
  `user_alamat` text NOT NULL,
  `user_password` varchar(255) NOT NULL,
  `user_foto` text,
  `user_status` varchar(20) DEFAULT NULL,
  `level` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`user_id`, `user_nomorhp`, `user_nama`, `user_tempatlahir`, `user_tanggallahir`, `user_namaorangtua`, `user_nomorkk`, `user_alamat`, `user_password`, `user_foto`, `user_status`, `level`) VALUES
(1, '1234', 'Admin Dinas PA', 'Lubuklinggau', '1995-07-08', 'Admin Dinas PA', '1234', 'Jalan Koprral Makruf', '81dc9bdb52d04dc20036dbd8313ed055', '', 'online', 1),
(7, '081298012252', 'Hj. Sri Murniasih', 'Tegal', '1967-10-26', 'R.Rashoedi', '19671026', 'Kayuara Rt.2', '026b9da41c23b1b0874a9ac57c36569a', '', 'online', 2),
(8, '085268069710', 'Murni ', 'Lubuklinggau', '1975-10-26', 'Alfian', '167100', 'Taba Rena', '2e47edfcead1056cab10d6818139f531', '', 'online', 2),
(9, '082374980429', 'Yandra Myxhtar', 'Lubuk linggau', '1965-01-12', 'Muchtar Rasyd', '975468001', 'jl. beringin', 'a45e778f52ba7a67429d0fd958421ed6', '', 'online', 2);

--
-- 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`);

--
-- Indexes for table `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`user_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;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
  MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
