-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Oct 26, 2025 at 10:39 AM
-- Server version: 10.11.14-MariaDB
-- PHP Version: 8.4.10

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

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

--
-- Table structure for table `puc`
--

CREATE TABLE `puc` (
  `id` int(11) NOT NULL,
  `application_no` varchar(100) DEFAULT NULL COMMENT 'Unique application number',
  `username` varchar(100) DEFAULT NULL COMMENT 'Username from session',
  `appliedby` varchar(100) NOT NULL COMMENT 'User phone/ID who applied',
  `owner_name` varchar(255) NOT NULL COMMENT 'Vehicle owner name',
  `mobile_number` varchar(15) NOT NULL COMMENT '10 digit mobile',
  `bike_number` varchar(50) DEFAULT NULL COMMENT 'Vehicle registration number',
  `vehicle_type` varchar(50) NOT NULL COMMENT 'Two Wheeler / Four Wheeler',
  `vehicle_photo` varchar(255) NOT NULL COMMENT 'Photo path',
  `fuel_type` varchar(50) NOT NULL COMMENT 'Petrol/Diesel/CNG/Electric',
  `fee` decimal(10,2) NOT NULL DEFAULT 0.00 COMMENT 'Amount charged',
  `old_balance` decimal(10,2) DEFAULT NULL COMMENT 'Balance before deduction',
  `new_balance` decimal(10,2) DEFAULT NULL COMMENT 'Balance after deduction',
  `purpose` text DEFAULT NULL,
  `remark` text DEFAULT NULL COMMENT 'Admin remark',
  `data` varchar(255) DEFAULT NULL COMMENT 'Certificate PDF path',
  `date` datetime NOT NULL COMMENT 'Application date',
  `status` varchar(50) NOT NULL DEFAULT 'pending' COMMENT 'pending/in-progress/approved/rejected'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `puc`
--

INSERT INTO `puc` (`id`, `application_no`, `username`, `appliedby`, `owner_name`, `mobile_number`, `bike_number`, `vehicle_type`, `vehicle_photo`, `fuel_type`, `fee`, `old_balance`, `new_balance`, `purpose`, `remark`, `data`, `date`, `status`) VALUES
(22, 'puc_741445', 'admin', 'admin', 'Rajesh Kumar', '9876543200', 'mh04ba7766', 'Two Wheeler', 'uploads/RajeshKumar_1761474800.png', 'Diesel', 60.00, 8273.00, 8213.00, NULL, 'sucess', 'https://lostdata.in/uploads/1486d.pdf', '2025-10-26 16:03:21', 'approved');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `puc`
--
ALTER TABLE `puc`
  ADD PRIMARY KEY (`id`),
  ADD KEY `appliedby` (`appliedby`),
  ADD KEY `application_no` (`application_no`),
  ADD KEY `status` (`status`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `puc`
--
ALTER TABLE `puc`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
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 */;
