text: -- phpMyAdmin SQL Dump
  -- version 4.8.2
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Jul 26, 2018 at 06:33 AM
  -- Server version: 10.1.34-MariaDB
  -- PHP Version: 7.2.7
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  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_telacc`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `bast`
  --
  
  CREATE TABLE `bast` (
    `BAST_ID` int(11) NOT NULL,
    `BAST_TANGGAL` date NOT NULL,
    `BAST_NO` int(11) NOT NULL,
    `BAST_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `BAST_WODE_ID` int(11) NOT NULL,
    `BAST_INST_ID` int(11) NOT NULL,
    `BAST_SPTL_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `instalasi`
  --
  
  CREATE TABLE `instalasi` (
    `INST_ID` int(11) NOT NULL,
    `INST_MATERIAL` int(11) NOT NULL,
    `INST_JASA` int(11) NOT NULL,
    `INST_TOTAL` int(11) NOT NULL,
    `INST_ODP` int(11) NOT NULL,
    `INST_PROGRES` text NOT NULL,
    `INST_KENDALA` text NOT NULL,
    `INST_DOKUMENTASI` text NOT NULL,
    `INST_TANGGAL` date NOT NULL,
    `INST_TARGET` date NOT NULL,
    `INST_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `INST_WODE_ID` int(11) NOT NULL,
    `INST_MTRA_ID` int(11) NOT NULL,
    `INST_PEGA_ID` int(11) NOT NULL,
    `INST_WTEL_ID` int(11) NOT NULL,
    `INST_SWIT_ID` int(11) NOT NULL,
    `INST_PROG_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `level`
  --
  
  CREATE TABLE `level` (
    `LEVE_ID` int(11) NOT NULL,
    `LEVE_NAME` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `level`
  --
  
  INSERT INTO `level` (`LEVE_ID`, `LEVE_NAME`) VALUES
  (1, 'SUPER USER'),
  (2, 'ADMIN WORK ORDER'),
  (3, 'ADMIN SURVEY'),
  (4, 'ADMIN INSTALASI'),
  (5, 'ADMIN BAST');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mitra`
  --
  
  CREATE TABLE `mitra` (
    `MTRA_ID` int(11) NOT NULL,
    `MTRA_NAME` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `pegawai`
  --
  
  CREATE TABLE `pegawai` (
    `PEGA_ID` int(11) NOT NULL,
    `PEGA_NAME` varchar(100) NOT NULL,
    `PEGA_NIK` int(11) NOT NULL,
    `PEGA_PSA` varchar(100) NOT NULL,
    `PEGA_ID_OBJ` varchar(50) NOT NULL,
    `PEGA_WTEL_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `pegawai`
  --
  
  INSERT INTO `pegawai` (`PEGA_ID`, `PEGA_NAME`, `PEGA_NIK`, `PEGA_PSA`, `PEGA_ID_OBJ`, `PEGA_WTEL_ID`) VALUES
  (1, 'SUDO', 1, '1', '1', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `program`
  --
  
  CREATE TABLE `program` (
    `PROG_ID` int(11) NOT NULL,
    `PROG_NAME` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `sp_mitra`
  --
  
  CREATE TABLE `sp_mitra` (
    `SPMT_ID` int(11) NOT NULL,
    `SPMT_NO` int(11) NOT NULL,
    `SPMT_ID_PR` int(11) NOT NULL,
    `SPMT_STATUS` varchar(50) NOT NULL,
    `SPMT_MATERIAL` int(11) NOT NULL,
    `SPMT_JASA` int(11) NOT NULL,
    `SPMT_TOTAL` int(11) NOT NULL,
    `SPMT_ODP` int(11) NOT NULL,
    `SPMT_NO_APM` int(11) NOT NULL,
    `SPMT_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `SPMT_WODE_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `sp_telkom`
  --
  
  CREATE TABLE `sp_telkom` (
    `SPTL_ID` int(11) NOT NULL,
    `SPTL_NO` varchar(100) NOT NULL,
    `SPTL_IDP` varchar(100) NOT NULL,
    `SPTL_NO_PO` int(11) NOT NULL,
    `SPTL_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `SPTL_SURV_ID` int(11) NOT NULL,
    `SPTL_WODE_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `status`
  --
  
  CREATE TABLE `status` (
    `STAT_ID` int(11) NOT NULL,
    `STAT_NAME` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `sub_witel`
  --
  
  CREATE TABLE `sub_witel` (
    `SWIT_ID` int(11) NOT NULL,
    `SWIT_NAME` varchar(100) NOT NULL,
    `SWIT_WTEL_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `survey`
  --
  
  CREATE TABLE `survey` (
    `SURV_ID` int(11) NOT NULL,
    `SURV_MATERIAL` int(11) NOT NULL,
    `SURV_JASA` int(11) NOT NULL,
    `SURV_TOTAL` int(11) NOT NULL,
    `SURV_ODP` int(11) NOT NULL,
    `SURV_TANGGAL` date NOT NULL,
    `SURV_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `SURV_WODE_ID` int(11) NOT NULL,
    `SURV_PEGA_ID` int(11) NOT NULL,
    `SURV_WTEL_ID` int(11) NOT NULL,
    `SURV_SWIT_ID` int(11) NOT NULL,
    `SURV_PROG_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `USER_ID` int(11) NOT NULL,
    `USER_NAME` varchar(50) NOT NULL,
    `USER_PASSWORD` varchar(50) NOT NULL,
    `USER_PICTURE` text NOT NULL,
    `USER_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `USER_LEVE_ID` int(11) NOT NULL,
    `USER_PEGA_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`USER_ID`, `USER_NAME`, `USER_PASSWORD`, `USER_PICTURE`, `USER_TIMESTAMP`, `USER_LEVE_ID`, `USER_PEGA_ID`) VALUES
  (1, 'SUDO', '28a4437b86f15b3e4204252dd75327fe', '-', '2018-07-17 01:23:23', 1, 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `witel`
  --
  
  CREATE TABLE `witel` (
    `WTEL_ID` int(11) NOT NULL,
    `WTEL_NAME` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `work_order`
  --
  
  CREATE TABLE `work_order` (
    `WODE_ID` int(11) NOT NULL,
    `WODE_ID_TA` char(11) NOT NULL,
    `WODE_NAMA_LOKASI` text NOT NULL,
    `WODE_KOORDINAT` text NOT NULL,
    `WODE_ALAMAT` text NOT NULL,
    `WODE_TANGGAL` date NOT NULL,
    `WODE_TIMESTAMP` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `WODE_WTEL_ID` int(11) NOT NULL,
    `WODE_SWIT_ID` int(11) NOT NULL,
    `WODE_PROG_ID` int(11) NOT NULL,
    `WODE_STAT_ID` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `bast`
  --
  ALTER TABLE `bast`
    ADD PRIMARY KEY (`BAST_ID`);
  
  --
  -- Indexes for table `instalasi`
  --
  ALTER TABLE `instalasi`
    ADD PRIMARY KEY (`INST_ID`);
  
  --
  -- Indexes for table `level`
  --
  ALTER TABLE `level`
    ADD PRIMARY KEY (`LEVE_ID`);
  
  --
  -- Indexes for table `mitra`
  --
  ALTER TABLE `mitra`
    ADD PRIMARY KEY (`MTRA_ID`);
  
  --
  -- Indexes for table `pegawai`
  --
  ALTER TABLE `pegawai`
    ADD PRIMARY KEY (`PEGA_ID`);
  
  --
  -- Indexes for table `program`
  --
  ALTER TABLE `program`
    ADD PRIMARY KEY (`PROG_ID`);
  
  --
  -- Indexes for table `sp_mitra`
  --
  ALTER TABLE `sp_mitra`
    ADD PRIMARY KEY (`SPMT_ID`);
  
  --
  -- Indexes for table `sp_telkom`
  --
  ALTER TABLE `sp_telkom`
    ADD PRIMARY KEY (`SPTL_ID`);
  
  --
  -- Indexes for table `status`
  --
  ALTER TABLE `status`
    ADD PRIMARY KEY (`STAT_ID`);
  
  --
  -- Indexes for table `sub_witel`
  --
  ALTER TABLE `sub_witel`
    ADD PRIMARY KEY (`SWIT_ID`);
  
  --
  -- Indexes for table `survey`
  --
  ALTER TABLE `survey`
    ADD PRIMARY KEY (`SURV_ID`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`USER_ID`);
  
  --
  -- Indexes for table `witel`
  --
  ALTER TABLE `witel`
    ADD PRIMARY KEY (`WTEL_ID`);
  
  --
  -- Indexes for table `work_order`
  --
  ALTER TABLE `work_order`
    ADD PRIMARY KEY (`WODE_ID`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `bast`
  --
  ALTER TABLE `bast`
    MODIFY `BAST_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `instalasi`
  --
  ALTER TABLE `instalasi`
    MODIFY `INST_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `level`
  --
  ALTER TABLE `level`
    MODIFY `LEVE_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `mitra`
  --
  ALTER TABLE `mitra`
    MODIFY `MTRA_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `pegawai`
  --
  ALTER TABLE `pegawai`
    MODIFY `PEGA_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `program`
  --
  ALTER TABLE `program`
    MODIFY `PROG_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `sp_mitra`
  --
  ALTER TABLE `sp_mitra`
    MODIFY `SPMT_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `sp_telkom`
  --
  ALTER TABLE `sp_telkom`
    MODIFY `SPTL_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `status`
  --
  ALTER TABLE `status`
    MODIFY `STAT_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `sub_witel`
  --
  ALTER TABLE `sub_witel`
    MODIFY `SWIT_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `survey`
  --
  ALTER TABLE `survey`
    MODIFY `SURV_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `USER_ID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `witel`
  --
  ALTER TABLE `witel`
    MODIFY `WTEL_ID` int(11) NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT for table `work_order`
  --
  ALTER TABLE `work_order`
    MODIFY `WODE_ID` int(11) NOT NULL AUTO_INCREMENT;
  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 */;
  