-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Oct 26, 2025 at 01:49 PM
-- Server version: 11.8.3-MariaDB-log
-- PHP Version: 7.2.34

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: `u653090826_bengkel`
--

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

--
-- Table structure for table `kendaraan`
--

CREATE TABLE `kendaraan` (
  `no_id` int(15) NOT NULL,
  `Merk_kendaraan` varchar(50) NOT NULL,
  `Tipe_kendaraan` varchar(50) NOT NULL,
  `Plat_nomer` varchar(20) NOT NULL,
  `Th_pembuatan` int(10) NOT NULL,
  `Keterangan` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `kendaraan`
--

INSERT INTO `kendaraan` (`no_id`, `Merk_kendaraan`, `Tipe_kendaraan`, `Plat_nomer`, `Th_pembuatan`, `Keterangan`) VALUES
(1, 'Toyota', 'Avanza Grand 2010 Abu-abu Metalic', 'AD1134PC', 2010, 'Kendaraan lama tapi masih bagus dan mulus.');

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

--
-- Table structure for table `lain_lain`
--

CREATE TABLE `lain_lain` (
  `Tanggal_service` date NOT NULL,
  `Biaya_lain` varchar(100) NOT NULL,
  `Harga_satuan` int(20) NOT NULL,
  `Jumlah_beli` int(20) NOT NULL,
  `Lunas` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `lain_lain`
--

INSERT INTO `lain_lain` (`Tanggal_service`, `Biaya_lain`, `Harga_satuan`, `Jumlah_beli`, `Lunas`) VALUES
('2025-10-26', 'Biaya Tambahan', 8000, 3, 0);

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

--
-- Table structure for table `onderdil`
--

CREATE TABLE `onderdil` (
  `no_id` int(15) NOT NULL,
  `Nama_onderdil` varchar(100) NOT NULL,
  `Harga_beli` int(20) NOT NULL,
  `Harga_jual` int(20) NOT NULL,
  `Stok` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `onderdil`
--

INSERT INTO `onderdil` (`no_id`, `Nama_onderdil`, `Harga_beli`, `Harga_jual`, `Stok`) VALUES
(1, 'Rem Cakram Avanza Terbaru', 25000, 35000, 30),
(2, 'Plat Kopling Avanza 2010', 500000, 525000, 10),
(3, 'Lampu Depan Avanza 2010 Standard', 45000, 55000, 30),
(4, 'Oil Filter Avanza 2010', 150000, 175000, 30),
(6, 'Kaca Spion Avanza sepasang', 450000, 500000, 20);

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

--
-- Table structure for table `pelanggan`
--

CREATE TABLE `pelanggan` (
  `no_id` int(15) NOT NULL,
  `Nama` varchar(50) NOT NULL,
  `Alamat` varchar(100) NOT NULL,
  `Email` varchar(50) NOT NULL,
  `No_hape` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `pelanggan`
--

INSERT INTO `pelanggan` (`no_id`, `Nama`, `Alamat`, `Email`, `No_hape`) VALUES
(2, 'Agung Suryanto, SE, MM', 'Kauman, Tonggalan, Klaten', 'agung@gmail.com', '0854787598'),
(4, 'Edi Seno Adji', 'Buntalan, RT.003/RW.006, Buntalan, Klaten Tengah', 'ediseno@gmail.com', '0859896093');

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

--
-- Table structure for table `profil`
--

CREATE TABLE `profil` (
  `Nama_bengkel` varchar(100) NOT NULL,
  `Alamat` varchar(100) NOT NULL,
  `Email` varchar(100) NOT NULL,
  `No_hape` varchar(50) NOT NULL,
  `Gbr_bengkel` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `profil`
--

INSERT INTO `profil` (`Nama_bengkel`, `Alamat`, `Email`, `No_hape`, `Gbr_bengkel`) VALUES
('Surabaya Motor', 'Jalan Tunjungan 235, Surabaya', 'purbo@bengkel.com', '0859873984', 'logo_bengkel.png');

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

--
-- Table structure for table `service`
--

CREATE TABLE `service` (
  `Tanggal_service` date NOT NULL,
  `Biaya_service` int(20) NOT NULL,
  `Discount` int(10) NOT NULL,
  `Lunas` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `service`
--

INSERT INTO `service` (`Tanggal_service`, `Biaya_service`, `Discount`, `Lunas`) VALUES
('2025-10-26', 150000, 34900, 0);

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

--
-- Table structure for table `transaksi`
--

CREATE TABLE `transaksi` (
  `no_trans` int(15) NOT NULL,
  `Tanggal_beli` date NOT NULL,
  `No_plg` int(15) NOT NULL,
  `No_kendaraan` int(15) NOT NULL,
  `No_onderdil` int(15) NOT NULL,
  `Lunas` tinyint(1) NOT NULL,
  `Total_Biaya` int(20) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `transaksi`
--

INSERT INTO `transaksi` (`no_trans`, `Tanggal_beli`, `No_plg`, `No_kendaraan`, `No_onderdil`, `Lunas`, `Total_Biaya`) VALUES
(3, '2025-10-26', 2, 1, 4, 0, 314100);

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `no_id` int(15) NOT NULL,
  `username` varchar(30) NOT NULL,
  `password` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`no_id`, `username`, `password`) VALUES
(1, 'boss', '$2y$10$J/91rXxyPbNcH0zFEiBPouv8SwJX.9d.9YJfgKMphFd3P.q6vVMkm'),
(4, 'firas', '$2y$10$7VTRuDfw647efono.7FjoerSu.zv2zcJ0V7WtYsVEAcvLpmMl7kX6'),
(5, 'edi', '$2y$10$mDWx3RDFg3i9SSI3gotmJOqWnvO2Ztd04QLx3iOzwfWeDIKi5rD.K');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `kendaraan`
--
ALTER TABLE `kendaraan`
  ADD PRIMARY KEY (`no_id`);

--
-- Indexes for table `onderdil`
--
ALTER TABLE `onderdil`
  ADD PRIMARY KEY (`no_id`);

--
-- Indexes for table `pelanggan`
--
ALTER TABLE `pelanggan`
  ADD PRIMARY KEY (`no_id`);

--
-- Indexes for table `transaksi`
--
ALTER TABLE `transaksi`
  ADD PRIMARY KEY (`no_trans`),
  ADD KEY `No_plg` (`No_plg`,`No_kendaraan`,`No_onderdil`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`no_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `kendaraan`
--
ALTER TABLE `kendaraan`
  MODIFY `no_id` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `onderdil`
--
ALTER TABLE `onderdil`
  MODIFY `no_id` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `pelanggan`
--
ALTER TABLE `pelanggan`
  MODIFY `no_id` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `transaksi`
--
ALTER TABLE `transaksi`
  MODIFY `no_trans` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `no_id` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
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 */;
