-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Sep 16, 2021 at 10:36 AM
-- Server version: 10.4.16-MariaDB
-- PHP Version: 7.4.12

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_umkm2`
--

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

--
-- Table structure for table `tb_absen`
--

CREATE TABLE `tb_absen` (
  `id_absen` bigint(20) NOT NULL,
  `bulan` int(11) NOT NULL,
  `tahun` int(11) NOT NULL,
  `jumlah_umkm` bigint(20) NOT NULL,
  `omset` bigint(20) NOT NULL,
  `aset` bigint(20) NOT NULL,
  `karyawan_l` bigint(20) NOT NULL,
  `karyawan_p` bigint(20) NOT NULL,
  `status_absen` enum('open','close') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_absen`
--

INSERT INTO `tb_absen` (`id_absen`, `bulan`, `tahun`, `jumlah_umkm`, `omset`, `aset`, `karyawan_l`, `karyawan_p`, `status_absen`) VALUES
(35, 1, 2020, 0, 0, 0, 0, 0, 'close'),
(36, 2, 2020, 0, 0, 0, 0, 0, 'close'),
(37, 3, 2020, 0, 0, 0, 0, 0, 'close'),
(38, 4, 2020, 0, 0, 0, 0, 0, 'close'),
(39, 5, 2020, 0, 0, 0, 0, 0, 'close'),
(40, 6, 2020, 0, 0, 0, 0, 0, 'close'),
(41, 7, 2020, 0, 0, 0, 0, 0, 'close'),
(42, 8, 2020, 0, 0, 0, 0, 0, 'close'),
(43, 9, 2020, 0, 0, 0, 0, 0, 'close'),
(44, 10, 2020, 0, 0, 0, 0, 0, 'close'),
(45, 11, 2020, 0, 0, 0, 0, 0, 'close'),
(46, 12, 2020, 4, 30000000, 150000000, 30, 30, 'close'),
(48, 1, 2021, 4, 0, 145000000, 58, 34, 'open');

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

--
-- Table structure for table `tb_absensi`
--

CREATE TABLE `tb_absensi` (
  `id_absensi` bigint(20) NOT NULL,
  `id_absen` varchar(20) NOT NULL,
  `id_umkm` varchar(20) NOT NULL,
  `id_pemilik` varchar(20) NOT NULL,
  `kecamatan` varchar(50) NOT NULL,
  `kelurahan` varchar(50) NOT NULL,
  `aset` bigint(20) NOT NULL,
  `omset` bigint(20) NOT NULL,
  `karyawan_l` bigint(20) NOT NULL,
  `karyawan_p` bigint(20) NOT NULL,
  `bulan` varchar(20) NOT NULL,
  `tahun` varchar(20) NOT NULL,
  `signed` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_absensi`
--

INSERT INTO `tb_absensi` (`id_absensi`, `id_absen`, `id_umkm`, `id_pemilik`, `kecamatan`, `kelurahan`, `aset`, `omset`, `karyawan_l`, `karyawan_p`, `bulan`, `tahun`, `signed`) VALUES
(121, '35', '1', '2', '', '', 0, 0, 0, 0, '1', '2020', 1),
(122, '35', '2', '2', '', '', 0, 0, 0, 0, '1', '2020', 1),
(123, '35', '3', '2', '', '', 0, 0, 0, 0, '1', '2020', 1),
(124, '35', '4', '6', '', '', 0, 0, 0, 0, '1', '2020', 1),
(125, '36', '1', '2', '', '', 0, 0, 0, 0, '2', '2020', 1),
(126, '36', '2', '2', '', '', 0, 0, 0, 0, '2', '2020', 1),
(127, '36', '3', '2', '', '', 0, 0, 0, 0, '2', '2020', 1),
(128, '36', '4', '6', '', '', 0, 0, 0, 0, '2', '2020', 1),
(129, '37', '1', '2', '', '', 0, 0, 0, 0, '3', '2020', 1),
(130, '37', '2', '2', '', '', 0, 0, 0, 0, '3', '2020', 1),
(131, '37', '3', '2', '', '', 0, 0, 0, 0, '3', '2020', 1),
(132, '37', '4', '6', '', '', 0, 0, 0, 0, '3', '2020', 1),
(133, '38', '1', '2', '', '', 0, 0, 0, 0, '4', '2020', 1),
(134, '38', '2', '2', '', '', 0, 0, 0, 0, '4', '2020', 1),
(135, '38', '3', '2', '', '', 0, 0, 0, 0, '4', '2020', 1),
(136, '38', '4', '6', '', '', 0, 0, 0, 0, '4', '2020', 1),
(137, '39', '1', '2', '', '', 0, 0, 0, 0, '5', '2020', 1),
(138, '39', '2', '2', '', '', 0, 0, 0, 0, '5', '2020', 1),
(139, '39', '3', '2', '', '', 0, 0, 0, 0, '5', '2020', 1),
(140, '39', '4', '6', '', '', 0, 0, 0, 0, '5', '2020', 1),
(141, '40', '1', '2', '', '', 0, 0, 0, 0, '6', '2020', 1),
(142, '40', '2', '2', '', '', 0, 0, 0, 0, '6', '2020', 1),
(143, '40', '3', '2', '', '', 0, 0, 0, 0, '6', '2020', 1),
(144, '40', '4', '6', '', '', 0, 0, 0, 0, '6', '2020', 1),
(145, '41', '1', '2', '', '', 0, 0, 0, 0, '7', '2020', 1),
(146, '41', '2', '2', '', '', 0, 0, 0, 0, '7', '2020', 1),
(147, '41', '3', '2', '', '', 0, 0, 0, 0, '7', '2020', 1),
(148, '41', '4', '6', '', '', 0, 0, 0, 0, '7', '2020', 1),
(149, '42', '1', '2', '', '', 0, 0, 0, 0, '8', '2020', 1),
(150, '42', '2', '2', '', '', 0, 0, 0, 0, '8', '2020', 1),
(151, '42', '3', '2', '', '', 0, 0, 0, 0, '8', '2020', 1),
(152, '42', '4', '6', '', '', 0, 0, 0, 0, '8', '2020', 1),
(153, '43', '1', '2', '', '', 0, 0, 0, 0, '9', '2020', 1),
(154, '43', '2', '2', '', '', 0, 0, 0, 0, '9', '2020', 1),
(155, '43', '3', '2', '', '', 0, 0, 0, 0, '9', '2020', 1),
(156, '43', '4', '6', '', '', 0, 0, 0, 0, '9', '2020', 1),
(157, '44', '1', '2', '', '', 0, 0, 0, 0, '10', '2020', 1),
(158, '44', '2', '2', '', '', 0, 0, 0, 0, '10', '2020', 1),
(159, '44', '3', '2', '', '', 0, 0, 0, 0, '10', '2020', 1),
(160, '44', '4', '6', '', '', 0, 0, 0, 0, '10', '2020', 1),
(161, '45', '1', '2', '', '', 0, 0, 0, 0, '11', '2020', 1),
(162, '45', '2', '2', '', '', 0, 0, 0, 0, '11', '2020', 1),
(163, '45', '3', '2', '', '', 0, 0, 0, 0, '11', '2020', 1),
(164, '45', '4', '6', '', '', 0, 0, 0, 0, '11', '2020', 1),
(165, '46', '1', '2', '', '', 0, 0, 0, 0, '12', '2020', 1),
(166, '46', '2', '2', '', '', 0, 0, 0, 0, '12', '2020', 1),
(167, '46', '3', '2', '', '', 0, 0, 0, 0, '12', '2020', 1),
(168, '46', '4', '6', '', '', 0, 0, 0, 0, '12', '2020', 1),
(173, '48', '1', '2', 'Magelang Utara', 'Kramat Utara', 100000000, 5000000, 20, 8, '1', '2021', 1),
(174, '48', '2', '2', 'Magelang Selatan', 'Tidar Selatan', 30000000, 0, 30, 12, '1', '2021', 0),
(175, '48', '3', '2', 'Magelang Selatan', 'Rejowinangun Selatan', 5000000, 0, 5, 8, '1', '2021', 0),
(176, '48', '4', '6', 'Magelang Tengah', 'Cacaban', 10000000, 0, 3, 6, '1', '2021', 0);

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

--
-- Table structure for table `tb_jenis`
--

CREATE TABLE `tb_jenis` (
  `id_jenis` int(11) NOT NULL,
  `jenis` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_jenis`
--

INSERT INTO `tb_jenis` (`id_jenis`, `jenis`) VALUES
(1, 'Industri'),
(2, 'Perdagangan'),
(3, 'Jasa');

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

--
-- Table structure for table `tb_kategori`
--

CREATE TABLE `tb_kategori` (
  `id_kategori` int(11) NOT NULL,
  `kategori` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_kategori`
--

INSERT INTO `tb_kategori` (`id_kategori`, `kategori`) VALUES
(1, 'Mikro'),
(2, 'Kecil'),
(3, 'Menengah');

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

--
-- Table structure for table `tb_kelurahan`
--

CREATE TABLE `tb_kelurahan` (
  `id_kelurahan` bigint(20) NOT NULL,
  `kelurahan` varchar(50) NOT NULL,
  `kecamatan` enum('Magelang Selatan','Magelang Tengah','Magelang Utara') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_kelurahan`
--

INSERT INTO `tb_kelurahan` (`id_kelurahan`, `kelurahan`, `kecamatan`) VALUES
(1, 'Jurangombo Selatan', 'Magelang Selatan'),
(2, 'Jurangombo Utara', 'Magelang Selatan'),
(3, 'Magersari', 'Magelang Selatan'),
(4, 'Rejowinangun Selatan', 'Magelang Selatan'),
(5, 'Tidar Selatan', 'Magelang Selatan'),
(6, 'Tidar Utara', 'Magelang Selatan'),
(17, 'Cacaban', 'Magelang Tengah'),
(18, 'Gelangan', 'Magelang Tengah'),
(19, 'Kemirirejo', 'Magelang Tengah'),
(20, 'Magelang', 'Magelang Tengah'),
(21, 'Panjang', 'Magelang Tengah'),
(22, 'Rejowinangun Utara', 'Magelang Tengah'),
(23, 'Kedungsari', 'Magelang Utara'),
(24, 'Kramat Selatan', 'Magelang Utara'),
(25, 'Kramat Utara', 'Magelang Utara'),
(26, 'Potrobangsan', 'Magelang Utara'),
(27, 'Wates', 'Magelang Utara');

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

--
-- Table structure for table `tb_laporan`
--

CREATE TABLE `tb_laporan` (
  `id_laporan` int(11) NOT NULL,
  `tahun` int(11) NOT NULL,
  `jml_umkm` bigint(20) NOT NULL,
  `total_aset` bigint(20) NOT NULL,
  `total_omset` bigint(20) NOT NULL,
  `jml_karyawan` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_laporan`
--

INSERT INTO `tb_laporan` (`id_laporan`, `tahun`, `jml_umkm`, `total_aset`, `total_omset`, `jml_karyawan`) VALUES
(1, 2019, 0, 0, 0, 0);

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

--
-- Table structure for table `tb_produk`
--

CREATE TABLE `tb_produk` (
  `id_produk` bigint(20) NOT NULL,
  `foto_produk` text NOT NULL,
  `id_umkm` bigint(20) NOT NULL,
  `produk` varchar(50) NOT NULL,
  `deskripsi` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `tb_umkm`
--

CREATE TABLE `tb_umkm` (
  `id_umkm` bigint(20) NOT NULL,
  `id_pemilik` varchar(50) NOT NULL,
  `nama` varchar(100) NOT NULL,
  `id_kategori` int(11) NOT NULL,
  `kecamatan` enum('Magelang Selatan','Magelang Tengah','Magelang Utara') NOT NULL,
  `kelurahan` varchar(50) NOT NULL,
  `alamat` text NOT NULL,
  `telp` varchar(30) NOT NULL,
  `id_jenis` int(11) NOT NULL,
  `omset_awal` bigint(20) NOT NULL,
  `aset_awal` bigint(20) NOT NULL,
  `karyawan_l` bigint(20) NOT NULL,
  `karyawan_p` bigint(20) NOT NULL,
  `deskripsi` text NOT NULL,
  `foto_umkm` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_umkm`
--

INSERT INTO `tb_umkm` (`id_umkm`, `id_pemilik`, `nama`, `id_kategori`, `kecamatan`, `kelurahan`, `alamat`, `telp`, `id_jenis`, `omset_awal`, `aset_awal`, `karyawan_l`, `karyawan_p`, `deskripsi`, `foto_umkm`) VALUES
(1, '2', 'Meubel Rotan', 1, 'Magelang Utara', 'Kramat Utara', 'Jl. Jeruk Purut, Kupatan, Kramat Utara, Magelang', '08121212121', 1, 25000000, 100000000, 20, 8, 'Sedia berbagai furnitur dan Meubel', '1.jpg'),
(2, '2', 'Percetakan Jaya Muya', 1, 'Magelang Selatan', 'Tidar Selatan', 'Kiringan III, Tidar Selatan, Kota Magelang', '0811111111', 2, 15000000, 30000000, 30, 12, 'Jasa Reklame, Baliho, Banner dan Printing Sepanduk', 'umkm.png'),
(3, '2', 'Frozen Food Magelang', 1, 'Magelang Selatan', 'Rejowinangun Selatan', 'Tanon, Jl. Singosari, Rejowinangun Selatan, Magelang', '08121212121', 2, 12000000, 5000000, 5, 8, 'Reseller Produk makanan beku : Sosis, Daging, Tempura, Nuget, dll', 'umkm.png'),
(4, '6', 'Putih Abu  Workshop', 1, 'Magelang Tengah', 'Cacaban', 'Cacaban Tengah', '+6233333923', 3, 16000000, 10000000, 3, 6, 'Souvenir Nikah Karakter', 'umkm.png');

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

--
-- Table structure for table `tb_user`
--

CREATE TABLE `tb_user` (
  `id_user` bigint(20) NOT NULL,
  `nama` varchar(30) NOT NULL,
  `username` varchar(20) NOT NULL,
  `password` text NOT NULL,
  `alamat_user` text NOT NULL,
  `kecamatan_user` enum('Magelang Selatan','Magelang Tengah','Magelang Utara','Luar Kota Magelang') NOT NULL,
  `kelurahan_user` varchar(50) NOT NULL,
  `kota_user` enum('Kota Magelang','Luar Kota Magelang') NOT NULL,
  `telp_user` varchar(30) NOT NULL,
  `npwp` varchar(60) NOT NULL,
  `foto_user` text NOT NULL,
  `level` enum('admin','pemilik') NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tb_user`
--

INSERT INTO `tb_user` (`id_user`, `nama`, `username`, `password`, `alamat_user`, `kecamatan_user`, `kelurahan_user`, `kota_user`, `telp_user`, `npwp`, `foto_user`, `level`) VALUES
(1, 'Admin', 'admin', '643ed2bde5b2f6bd70f7f32a9b0f4ebb', 'Kota Magelang', 'Magelang Selatan', '', 'Kota Magelang', '', '', 'user.png', 'admin'),
(2, 'Yoga Ismail Pratama', 'yogaismail', '643ed2bde5b2f6bd70f7f32a9b0f4ebb', 'Magelang', 'Magelang Selatan', 'Tidar Selatan', 'Kota Magelang', '0812222999383', '6343266', 'user.png', 'pemilik'),
(6, 'Prawira Setia ', 'prawira', '643ed2bde5b2f6bd70f7f32a9b0f4ebb', 'Jambe Wangi', 'Magelang Selatan', 'Kramat Utara', 'Kota Magelang', '082689625495', '', 'user.png', 'pemilik');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `tb_absen`
--
ALTER TABLE `tb_absen`
  ADD PRIMARY KEY (`id_absen`);

--
-- Indexes for table `tb_absensi`
--
ALTER TABLE `tb_absensi`
  ADD PRIMARY KEY (`id_absensi`),
  ADD KEY `id_absen` (`id_absen`),
  ADD KEY `id_umkm` (`id_umkm`),
  ADD KEY `aset` (`aset`);

--
-- Indexes for table `tb_jenis`
--
ALTER TABLE `tb_jenis`
  ADD PRIMARY KEY (`id_jenis`);

--
-- Indexes for table `tb_kategori`
--
ALTER TABLE `tb_kategori`
  ADD PRIMARY KEY (`id_kategori`);

--
-- Indexes for table `tb_kelurahan`
--
ALTER TABLE `tb_kelurahan`
  ADD PRIMARY KEY (`id_kelurahan`),
  ADD KEY `kecamatan` (`kecamatan`);

--
-- Indexes for table `tb_laporan`
--
ALTER TABLE `tb_laporan`
  ADD PRIMARY KEY (`id_laporan`);

--
-- Indexes for table `tb_produk`
--
ALTER TABLE `tb_produk`
  ADD PRIMARY KEY (`id_produk`),
  ADD KEY `id_umkm` (`id_umkm`),
  ADD KEY `produk` (`produk`);

--
-- Indexes for table `tb_umkm`
--
ALTER TABLE `tb_umkm`
  ADD PRIMARY KEY (`id_umkm`),
  ADD KEY `id_pemilik` (`id_pemilik`),
  ADD KEY `id_kategori` (`id_kategori`),
  ADD KEY `id_jenis` (`id_jenis`);

--
-- Indexes for table `tb_user`
--
ALTER TABLE `tb_user`
  ADD PRIMARY KEY (`id_user`),
  ADD UNIQUE KEY `username` (`username`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `tb_absen`
--
ALTER TABLE `tb_absen`
  MODIFY `id_absen` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;

--
-- AUTO_INCREMENT for table `tb_absensi`
--
ALTER TABLE `tb_absensi`
  MODIFY `id_absensi` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=177;

--
-- AUTO_INCREMENT for table `tb_jenis`
--
ALTER TABLE `tb_jenis`
  MODIFY `id_jenis` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tb_kategori`
--
ALTER TABLE `tb_kategori`
  MODIFY `id_kategori` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `tb_kelurahan`
--
ALTER TABLE `tb_kelurahan`
  MODIFY `id_kelurahan` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=28;

--
-- AUTO_INCREMENT for table `tb_laporan`
--
ALTER TABLE `tb_laporan`
  MODIFY `id_laporan` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `tb_produk`
--
ALTER TABLE `tb_produk`
  MODIFY `id_produk` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `tb_umkm`
--
ALTER TABLE `tb_umkm`
  MODIFY `id_umkm` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `tb_user`
--
ALTER TABLE `tb_user`
  MODIFY `id_user` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
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 */;
