-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 31, 2026 at 05:59 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.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: `raxibisman`
--

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

--
-- Table structure for table `barang`
--

CREATE TABLE `barang` (
  `idbarang` varchar(8) NOT NULL,
  `nama_barang` varchar(50) NOT NULL,
  `harga` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `customer`
--

CREATE TABLE `customer` (
  `idcustomer` varchar(8) NOT NULL,
  `bu` varchar(5) NOT NULL,
  `nama_customer` varchar(50) NOT NULL,
  `alamat` varchar(50) NOT NULL,
  `telp` char(12) NOT NULL,
  `email` varchar(50) NOT NULL,
  `pic` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `customer`
--

INSERT INTO `customer` (`idcustomer`, `bu`, `nama_customer`, `alamat`, `telp`, `email`, `pic`) VALUES
('CUS00001', 'PT', 'GELORA DJAJA', 'Jl. Bunturan No. 9, Bunturan - Tandes, Surabaya', '', 'admin.se@wismilak.com', 'Bpk M. Zaenal Fanani');

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

--
-- Table structure for table `detailraxi_ps`
--

CREATE TABLE `detailraxi_ps` (
  `iddetailps_raxi` varchar(8) NOT NULL,
  `idunit` varchar(8) NOT NULL,
  `nomor_unit` varchar(50) NOT NULL,
  `idservice` varchar(8) NOT NULL,
  `iddeteail_uraianraxi` varchar(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `detailuraian_raxi`
--

CREATE TABLE `detailuraian_raxi` (
  `iddeteail_uraianraxi` varchar(8) NOT NULL,
  `idjenis_service` varchar(8) NOT NULL,
  `idbarang` varchar(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `jenis_service`
--

CREATE TABLE `jenis_service` (
  `idjenis_service` varchar(8) NOT NULL,
  `jenis_service` varchar(50) NOT NULL,
  `harga` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `pegawai`
--

CREATE TABLE `pegawai` (
  `idpegawai` varchar(8) NOT NULL,
  `nama_pegawai` varchar(50) NOT NULL,
  `username` varchar(50) NOT NULL,
  `passe` varchar(50) NOT NULL,
  `akses` varchar(8) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pegawai`
--

INSERT INTO `pegawai` (`idpegawai`, `nama_pegawai`, `username`, `passe`, `akses`) VALUES
('PGW00001', 'Ivan IT', 'ivan_it', 'ivan123', 'Semua'),
('PGW00002', 'Dika', 'dika', 'dika123', 'Semua'),
('PGW00003', 'Wulan', 'wulan', 'wulan123', 'Semua'),
('PGW00004', 'Miftah', 'miftah', 'miftah123', 'Raxi'),
('PGW00005', 'Raisa', 'raisa', 'raisa123', 'Bisman');

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

--
-- Table structure for table `raxi_ps`
--

CREATE TABLE `raxi_ps` (
  `idps_raxi` varchar(8) NOT NULL,
  `idcustomer` varchar(8) NOT NULL,
  `iddetailps_raxi` varchar(8) NOT NULL,
  `nofile` varchar(20) NOT NULL,
  `tglps` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `service_raxi`
--

CREATE TABLE `service_raxi` (
  `idservice` varchar(8) NOT NULL,
  `no_woraxi` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `unit`
--

CREATE TABLE `unit` (
  `idunit` varchar(8) NOT NULL,
  `nama_unit` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `unit`
--

INSERT INTO `unit` (`idunit`, `nama_unit`) VALUES
('UNT00001', 'Hand Pallet Manual');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `barang`
--
ALTER TABLE `barang`
  ADD PRIMARY KEY (`idbarang`);

--
-- Indexes for table `customer`
--
ALTER TABLE `customer`
  ADD PRIMARY KEY (`idcustomer`);

--
-- Indexes for table `detailraxi_ps`
--
ALTER TABLE `detailraxi_ps`
  ADD PRIMARY KEY (`iddetailps_raxi`),
  ADD KEY `idservice` (`idservice`,`iddeteail_uraianraxi`),
  ADD KEY `idservice_2` (`idservice`,`iddeteail_uraianraxi`),
  ADD KEY `idservice_3` (`idservice`,`iddeteail_uraianraxi`),
  ADD KEY `iddeteail_uraianraxi` (`iddeteail_uraianraxi`),
  ADD KEY `idunit` (`idunit`);

--
-- Indexes for table `detailuraian_raxi`
--
ALTER TABLE `detailuraian_raxi`
  ADD PRIMARY KEY (`iddeteail_uraianraxi`),
  ADD KEY `idjenis_service` (`idjenis_service`,`idbarang`),
  ADD KEY `idbarang` (`idbarang`);

--
-- Indexes for table `jenis_service`
--
ALTER TABLE `jenis_service`
  ADD PRIMARY KEY (`idjenis_service`);

--
-- Indexes for table `pegawai`
--
ALTER TABLE `pegawai`
  ADD PRIMARY KEY (`idpegawai`);

--
-- Indexes for table `raxi_ps`
--
ALTER TABLE `raxi_ps`
  ADD PRIMARY KEY (`idps_raxi`),
  ADD KEY `idcustomer` (`idcustomer`,`iddetailps_raxi`),
  ADD KEY `iddetailps_raxi` (`iddetailps_raxi`);

--
-- Indexes for table `service_raxi`
--
ALTER TABLE `service_raxi`
  ADD PRIMARY KEY (`idservice`);

--
-- Indexes for table `unit`
--
ALTER TABLE `unit`
  ADD PRIMARY KEY (`idunit`);

--
-- Constraints for dumped tables
--

--
-- Constraints for table `detailraxi_ps`
--
ALTER TABLE `detailraxi_ps`
  ADD CONSTRAINT `detailraxi_ps_ibfk_1` FOREIGN KEY (`iddeteail_uraianraxi`) REFERENCES `detailuraian_raxi` (`iddeteail_uraianraxi`),
  ADD CONSTRAINT `detailraxi_ps_ibfk_2` FOREIGN KEY (`idservice`) REFERENCES `service_raxi` (`idservice`),
  ADD CONSTRAINT `detailraxi_ps_ibfk_3` FOREIGN KEY (`idunit`) REFERENCES `unit` (`idunit`);

--
-- Constraints for table `detailuraian_raxi`
--
ALTER TABLE `detailuraian_raxi`
  ADD CONSTRAINT `detailuraian_raxi_ibfk_1` FOREIGN KEY (`idbarang`) REFERENCES `barang` (`idbarang`),
  ADD CONSTRAINT `detailuraian_raxi_ibfk_2` FOREIGN KEY (`idjenis_service`) REFERENCES `jenis_service` (`idjenis_service`);

--
-- Constraints for table `raxi_ps`
--
ALTER TABLE `raxi_ps`
  ADD CONSTRAINT `raxi_ps_ibfk_1` FOREIGN KEY (`idcustomer`) REFERENCES `customer` (`idcustomer`),
  ADD CONSTRAINT `raxi_ps_ibfk_2` FOREIGN KEY (`iddetailps_raxi`) REFERENCES `detailraxi_ps` (`iddetailps_raxi`);
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 */;
