-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 27, 2022 at 06:01 PM
-- Server version: 10.4.14-MariaDB
-- 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: `inspection`
--

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

--
-- Table structure for table `exterior_auction_grade`
--

CREATE TABLE `exterior_auction_grade` (
  `id` int(11) NOT NULL,
  `grade` text DEFAULT NULL,
  `stock_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `exterior_auction_grade`
--

INSERT INTO `exterior_auction_grade` (`id`, `grade`, `stock_id`) VALUES
(8, 'S', 1),
(9, 'S', 2),
(10, 'S', 6),
(12, '5', 7),
(13, '5', 8),
(14, 'S', 9),
(15, 'S', 10),
(16, 'S', 69),
(17, '5', 71),
(18, '5', 112),
(19, '5', 113),
(20, 'S', 114),
(21, '4.5', 115),
(22, '4.5', 117),
(23, '5', 110),
(24, '5', 1121);

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

--
-- Table structure for table `exterior_grade_desc`
--

CREATE TABLE `exterior_grade_desc` (
  `id` text NOT NULL,
  `descr` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `exterior_grade_desc`
--

INSERT INTO `exterior_grade_desc` (`id`, `descr`) VALUES
('S', 'As new condition, under 5,000 kms'),
('5', 'Vehicle is like new. All original body parts. No repairs needed. Usually only given vehical less than 3 years old.'),
('4.5', 'Vehicle is excellent conditon. No slight scratched or dents.'),
('4', 'Vehicle is good conditon. few scratches / dents due to noram wear as you would get with any normal vehicle.'),
('3.5', 'Vehicle has a few scratches or dents visibly. The grade is usually given to a vehical in average conditon.'),
('3', 'Various scracthes or dents, some paint blemishes'),
('2', 'Wholly badly corroded, a non-standard car or has been modified in some way'),
('1', 'Very inferior, basically a pile of metal or very heavily modified.'),
('RA or A1', 'Vehicle has been in a minor accident. it has been repaired to an acceptable standard.'),
('R or A', 'A vehical which has been in an accident where some parts have been rapaired or replaced');

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

--
-- Table structure for table `inspection_cars`
--

CREATE TABLE `inspection_cars` (
  `id` int(11) NOT NULL,
  `Front_bumper` text DEFAULT NULL,
  `Left_headlamp` text DEFAULT NULL,
  `Right_headlamp` text DEFAULT NULL,
  `Front_grill` text DEFAULT NULL,
  `Front_bonnet` text DEFAULT NULL,
  `Front_glass` text DEFAULT NULL,
  `Right_front_door_glass` text DEFAULT NULL,
  `Right_rare_door_glass` text DEFAULT NULL,
  `Left_front_door_glass` text DEFAULT NULL,
  `Left_rare_door_glass` text DEFAULT NULL,
  `Roof` text DEFAULT NULL,
  `Rare_glass` text DEFAULT NULL,
  `Back_door` text DEFAULT NULL,
  `Left_taillamp` text DEFAULT NULL,
  `Right_taillamp` text DEFAULT NULL,
  `Rare_bumper` text DEFAULT NULL,
  `Right_front_tire` text DEFAULT NULL,
  `Right_front_fender` text DEFAULT NULL,
  `Right_front_door` text DEFAULT NULL,
  `Right_rare_door` text DEFAULT NULL,
  `Right_rare_fender` text DEFAULT NULL,
  `Right_rare_tire` text DEFAULT NULL,
  `Left_front_tire` text DEFAULT NULL,
  `Left_front_fender` text DEFAULT NULL,
  `Left_front_door` text DEFAULT NULL,
  `Left_rare_door` text DEFAULT NULL,
  `Left_rare_fender` text DEFAULT NULL,
  `Left_rare_tire` text DEFAULT NULL,
  `Engine_room` text DEFAULT NULL,
  `Stock_id` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `inspection_cars`
--

INSERT INTO `inspection_cars` (`id`, `Front_bumper`, `Left_headlamp`, `Right_headlamp`, `Front_grill`, `Front_bonnet`, `Front_glass`, `Right_front_door_glass`, `Right_rare_door_glass`, `Left_front_door_glass`, `Left_rare_door_glass`, `Roof`, `Rare_glass`, `Back_door`, `Left_taillamp`, `Right_taillamp`, `Rare_bumper`, `Right_front_tire`, `Right_front_fender`, `Right_front_door`, `Right_rare_door`, `Right_rare_fender`, `Right_rare_tire`, `Left_front_tire`, `Left_front_fender`, `Left_front_door`, `Left_rare_door`, `Left_rare_fender`, `Left_rare_tire`, `Engine_room`, `Stock_id`) VALUES
(1, NULL, NULL, NULL, NULL, NULL, 'X, XXX_or_XX, G', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'B3,BP', NULL, NULL, NULL, NULL, NULL, 'E1, E2', NULL, NULL, NULL, NULL, 'E1, E2', 'TPD, MUFD', '7'),
(2, NULL, NULL, NULL, NULL, NULL, 'X,XXX_or_XX,G', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'S1,S2,S3', NULL, NULL, NULL, NULL, NULL, 'A1', NULL, NULL, NULL, NULL, 'S1', 'EOL,FLS', '8'),
(3, NULL, 'XXX_or_XX', NULL, NULL, NULL, 'X,XXX_or_XX,G', NULL, NULL, NULL, NULL, NULL, 'G', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'S2', 'S1', NULL, 'P', NULL, NULL, NULL, 'RD,CD,MUFD,EOL,RLS', '9'),
(4, NULL, NULL, NULL, NULL, NULL, 'X,XXX_or_XX,G', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '6'),
(5, 'A1,A2', 'G', NULL, 'B2,B3,BP', NULL, 'XXX_or_XX,G', NULL, NULL, NULL, NULL, 'C1,P,H,M', NULL, NULL, 'X', NULL, 'W1,S1,S2', NULL, 'E2', 'E3,A1,A2,A3,U3,E1', 'A1,E3,A2,E2', NULL, NULL, 'S1', NULL, 'E2', 'E1,E2', 'B2,B3,BP', NULL, 'RD,EOL,MUFD', '10'),
(6, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '67'),
(7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'E3', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '69'),
(8, NULL, 'ABC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'U2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '71'),
(9, NULL, NULL, NULL, NULL, NULL, 'ABC', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'U2', NULL, NULL, NULL, NULL, NULL, NULL, '112'),
(10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'U1', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '113'),
(11, NULL, 'X', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'A2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '114'),
(12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'U2', NULL, NULL, NULL, NULL, 'U2', 'A1', NULL, NULL, NULL, NULL, NULL, NULL, '115'),
(13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '117'),
(14, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'U2', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '110'),
(15, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '1121');

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

--
-- Table structure for table `inspection_description`
--

CREATE TABLE `inspection_description` (
  `id` varchar(255) NOT NULL,
  `Flaw Description` varchar(255) NOT NULL,
  `Category` varchar(255) NOT NULL,
  `Type` varchar(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `inspection_description`
--

INSERT INTO `inspection_description` (`id`, `Flaw Description`, `Category`, `Type`) VALUES
('A1', 'Thumb Size', 'Scratches', 'B'),
('A2', 'Palm Size', 'Scratches', 'B'),
('A3', 'Larger Than A2', 'Scratches', 'B'),
('U1', 'Thumb Size', 'Dents', 'B'),
('U2', 'Palm Size', 'Dents', 'B'),
('U3', 'Larger Than A2', 'Dents', 'B'),
('E1', 'Tiny dimples or dents', 'Dents', 'B'),
('E2', 'several dimples', 'Dents', 'B'),
('E3', 'Many dimples', 'Dents', 'B'),
('B1', 'Small dents with scratch- thumn size', 'Dents', 'B'),
('B2', 'Dent with scratch - palm size', 'Dents', 'B'),
('B3', 'Big dent with scratch -  elbow size', 'Dents', 'B'),
('BP', 'Panel repair', 'Scratches', 'B'),
('W1', 'Wave in paint often caused by repair work - barely detectable', 'Waves', 'B'),
('W2', 'Repair Mark / Wave', 'Waves', 'B'),
('W3', 'Obvious repair mark . wave which needs to be rapainted', 'Waves', 'B'),
('S1', 'Slight rust', 'Rust', 'B'),
('S2', 'Heavy rust - a littie bigget than S1', 'Rust', 'B'),
('S3', 'Rust that needs a repair', 'Rust', 'B'),
('C1', 'Corrosion exists', 'Corrosion', 'B'),
('C2', 'Heavy Corrosion or hole', 'Corrosion', 'B'),
('Y1', 'Small hole or crack', 'Hole/Crack', 'B'),
('Y2', 'Hole or crack', 'Hole/Crack', 'B'),
('Y3', 'Big hole or crack', 'Hole/Crack', 'B'),
('X', 'Crack on windscreen -  needs raplacing', 'Panel/windscreen', 'G'),
('XXX_or_XX', 'Panel/windscreen has been raplaced', 'Panel/windscreen', 'G'),
('G', 'Stone chip in the glass', 'Panel/windscreen', 'G'),
('P', 'Paint damage', 'Other Markings', 'B'),
('H', 'Paint faded', 'Other Markings', 'B'),
('M', 'Repair marked', 'Other Markings', 'B'),
('--', 'A line is generally to show where a scratch is', 'Other Markings', 'B'),
('K', 'Flaw', 'Other Markings', 'B'),
('R', 'Repaired crack in glass', 'Other Markings', 'B'),
('RX', 'Repaired crack in glass that needs to be replaced', 'Other Markings', 'B'),
('RD', 'Radiator Damage', 'Other Marking', 'E'),
('CD', 'Condensor Damage', 'Other Marking', 'E'),
('FHD', 'Front Hosement Damaged', 'Other Marking', 'E'),
('BD', 'Battery Down', 'Other Marking', 'E'),
('CSD', 'Core Support Damage', 'Other Marking', 'E'),
('EOL', 'Engine Oil Lean', 'Other Marking', 'E'),
('FRS', 'Front Right Suspension', 'Other Marking', 'E'),
('FLS', 'Front Left Suspension', 'Other Marking', 'E'),
('RRS', 'Rare Right Suspension', 'Other Marking', 'E'),
('RLS', 'Rare Left Suspension', 'Other Marking', 'E'),
('TOL', 'Transmission Oil Leak', 'Other Marking', 'E'),
('TPD', 'Transmission Partly Damaged', 'Other Marking', 'E'),
('MUFD', 'Muffler Damaged', 'Other Marking', 'E'),
('ABC', 'ABCDE', 'Dents', 'G');

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

--
-- Table structure for table `inspection_pictures`
--

CREATE TABLE `inspection_pictures` (
  `id` int(8) NOT NULL,
  `stock` varchar(100) NOT NULL,
  `img` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `inspection_pictures`
--

INSERT INTO `inspection_pictures` (`id`, `stock`, `img`) VALUES
(1, '1121', 'images/1121.png');

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

--
-- Table structure for table `interior_auction_grade`
--

CREATE TABLE `interior_auction_grade` (
  `id` int(11) NOT NULL,
  `grade` text NOT NULL,
  `stock_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `interior_auction_grade`
--

INSERT INTO `interior_auction_grade` (`id`, `grade`, `stock_id`) VALUES
(5, 'A', 1),
(6, 'A', 2),
(7, 'A', 6),
(9, 'B', 7),
(10, 'A', 8),
(11, 'A', 9),
(12, 'A', 10),
(13, 'B', 69),
(14, 'B', 71),
(15, 'B', 112),
(16, 'B', 113),
(17, 'B', 114),
(18, 'B', 115),
(19, 'B', 117),
(20, 'B', 110),
(21, 'A', 1121);

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

--
-- Table structure for table `interior_grade_desc`
--

CREATE TABLE `interior_grade_desc` (
  `id` text NOT NULL,
  `descr` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `interior_grade_desc`
--

INSERT INTO `interior_grade_desc` (`id`, `descr`) VALUES
('A', 'As new condition, No faults.'),
('B', 'Very clean condition. Very slightly dirty.'),
('C', 'Clean but with a cigarette burn.'),
('D', 'Very unpleasent. Dirty or smelly or big rip / damaged on the seats.');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `exterior_auction_grade`
--
ALTER TABLE `exterior_auction_grade`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `stock_id` (`stock_id`);

--
-- Indexes for table `inspection_cars`
--
ALTER TABLE `inspection_cars`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `Stock_id` (`Stock_id`) USING HASH;

--
-- Indexes for table `inspection_pictures`
--
ALTER TABLE `inspection_pictures`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `interior_auction_grade`
--
ALTER TABLE `interior_auction_grade`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `stock_id` (`stock_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `exterior_auction_grade`
--
ALTER TABLE `exterior_auction_grade`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `inspection_cars`
--
ALTER TABLE `inspection_cars`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT for table `inspection_pictures`
--
ALTER TABLE `inspection_pictures`
  MODIFY `id` int(8) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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