-- --------------------------------------------------------
-- Хост:                         127.0.0.1
-- Версия сервера:               10.4.32-MariaDB - mariadb.org binary distribution
-- Операционная система:         Win64
-- HeidiSQL Версия:              12.16.0.7229
-- --------------------------------------------------------



-- Дамп структуры базы данных nn_auto
CREATE DATABASE IF NOT EXISTS `nn_auto` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */;
USE `nn_auto`;

-- Дамп структуры для таблица nn_auto.brand
CREATE TABLE IF NOT EXISTS `brand` (
  `brand_id` int(11) NOT NULL AUTO_INCREMENT,
  `brand_name` varchar(100) NOT NULL,
  PRIMARY KEY (`brand_id`) USING BTREE,
  UNIQUE KEY `uniq_brand_name` (`brand_name`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Дамп данных таблицы nn_auto.brand: ~48 rows (приблизительно)
INSERT INTO `brand` (`brand_id`, `brand_name`) VALUES
	(1, 'Abarth'),
	(2, 'Alfa Romeo'),
	(3, 'Audi'),
	(4, 'Bentley'),
	(5, 'BMW'),
	(6, 'Bugatti'),
	(7, 'Cadillac'),
	(8, 'Chevrolet'),
	(9, 'Chrysler'),
	(10, 'Citroen'),
	(11, 'Cupra'),
	(12, 'Dacia'),
	(13, 'Dodge'),
	(14, 'Ferrari'),
	(15, 'Fiat'),
	(16, 'Ford'),
	(17, 'Genesis'),
	(18, 'GMC'),
	(19, 'Honda'),
	(20, 'Hyundai'),
	(21, 'Infiniti'),
	(22, 'Jaguar'),
	(23, 'Jeep'),
	(24, 'Kia'),
	(25, 'Lamborghini'),
	(26, 'Land Rover'),
	(27, 'Lexus'),
	(28, 'Maserati'),
	(29, 'Mazda'),
	(30, 'McLaren'),
	(31, 'Mercedes-Benz'),
	(32, 'Mini'),
	(33, 'Mitsubishi'),
	(34, 'Nissan'),
	(35, 'Opel'),
	(36, 'Peugeot'),
	(37, 'Porsche'),
	(38, 'Renault'),
	(39, 'Rolls-Royce'),
	(40, 'Seat'),
	(41, 'Skoda'),
	(42, 'Smart'),
	(43, 'Subaru'),
	(44, 'Suzuki'),
	(45, 'Tesla'),
	(46, 'Toyota'),
	(47, 'Volkswagen'),
	(48, 'Volvo');

-- Дамп структуры для таблица nn_auto.car_images
CREATE TABLE IF NOT EXISTS `car_images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `car_id` int(11) NOT NULL,
  `image_path` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `car_id` (`car_id`),
  CONSTRAINT `car_images_ibfk_1` FOREIGN KEY (`car_id`) REFERENCES `cars` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Дамп данных таблицы nn_auto.car_images: ~17 rows (приблизительно)
INSERT INTO `car_images` (`id`, `car_id`, `image_path`, `created_at`) VALUES
	(5, 14, 'uploads/cars/car_69c95228aa7ec1.71035603.jpg', '2026-03-29 16:24:08'),
	(6, 14, 'uploads/cars/car_69c95228ab1957.76085428.jpg', '2026-03-29 16:24:08'),
	(7, 14, 'uploads/cars/car_69c95228ab2f45.22991051.jpg', '2026-03-29 16:24:08'),
	(8, 14, 'uploads/cars/car_69c95228abbbd7.24306004.jpg', '2026-03-29 16:24:08'),
	(9, 15, 'uploads/cars/car_69d126580334d3.15073423.jpg', '2026-04-04 14:55:20'),
	(10, 15, 'uploads/cars/car_69d12658035de9.86776877.jpg', '2026-04-04 14:55:20'),
	(11, 15, 'uploads/cars/car_69d12658037452.95405125.jpg', '2026-04-04 14:55:20'),
	(12, 15, 'uploads/cars/car_69d12658040296.94822243.jpg', '2026-04-04 14:55:20'),
	(13, 15, 'uploads/cars/car_69d12658041462.86726719.jpg', '2026-04-04 14:55:20'),
	(14, 15, 'uploads/cars/car_69d12658042579.66103061.jpg', '2026-04-04 14:55:20'),
	(15, 16, 'uploads/cars/car_69d131e4e33f70.83470771.jpg', '2026-04-04 15:44:36'),
	(16, 16, 'uploads/cars/car_69d131e4e42443.05300009.jpg', '2026-04-04 15:44:36'),
	(17, 16, 'uploads/cars/car_69d131e4e44806.59215466.jpg', '2026-04-04 15:44:36'),
	(18, 16, 'uploads/cars/car_69d131e4e45b53.78379192.jpg', '2026-04-04 15:44:36'),
	(19, 16, 'uploads/cars/car_69d131e4e502e2.71056923.jpg', '2026-04-04 15:44:36'),
	(20, 16, 'uploads/cars/car_69d131e4e515a0.99899387.jpg', '2026-04-04 15:44:36'),
	(21, 16, 'uploads/cars/car_69d131e4e527f2.96735650.jpg', '2026-04-04 15:44:36');

-- Дамп структуры для таблица nn_auto.cars
CREATE TABLE IF NOT EXISTS `cars` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Sludinājuma identifikators',
  `user_id` int(11) DEFAULT NULL COMMENT 'Norāda, kurš lietotājs pievienojis automašīnu',
  `title` varchar(200) NOT NULL COMMENT 'Sludinājuma virsraksts',
  `description` text DEFAULT NULL COMMENT 'Apraksts par automobili',
  `brand` varchar(50) NOT NULL COMMENT 'Automobiļa marka',
  `model` varchar(50) NOT NULL COMMENT 'Automobiļa modelis',
  `year` int(11) NOT NULL COMMENT 'Izlaiduma gads',
  `mileage` int(11) NOT NULL COMMENT 'Nobraukums (km)',
  `engine_type` varchar(20) NOT NULL COMMENT 'Dzinēja tips (benzīns, dīzelis, hybrid utt.)',
  `engine_volume` decimal(3,1) NOT NULL COMMENT 'Dzinēja tilpums (litros)',
  `transmission` varchar(20) NOT NULL COMMENT 'Pārnesumkārbas tips',
  `color` varchar(30) DEFAULT NULL COMMENT 'Automobiļa krāsa',
  `price` decimal(10,2) NOT NULL COMMENT 'Cena EUR',
  `image_path` varchar(255) DEFAULT NULL COMMENT 'Attēla failsistēmas ceļš',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Ieraksta izveides datums',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `cars_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Дамп данных таблицы nn_auto.cars: ~3 rows (приблизительно)
INSERT INTO `cars` (`id`, `user_id`, `title`, `description`, `brand`, `model`, `year`, `mileage`, `engine_type`, `engine_volume`, `transmission`, `color`, `price`, `image_path`, `created_at`) VALUES
	(14, 13, 'BMW 320', 'Pārdodu BMW 320e Plug-In Hybrid, 2021. gads.\r\nIzskatīgs auto, kas noteikti izcelsies uz ceļa.\r\nAuto nav cietis ceļu satiksmes negadījumos. Pieejama arī CarVertical atskaite.\r\n\r\nAuto ir atvests no Beļģijas, piereģistrēts Latvijā un izieta tehniskā apskate uz 2 gadiem – bez aizrādījumiem.\r\nCeļa nodoklis gadā – 0.00 €.\r\n\r\nAuto ne tikai labi izskatās no ārpuses, bet arī ir ekskluzīvs salons ar retāk sastopamiem M sporta sēdekļiem.\r\nKarbonšķiedras salona apdare ar ambient apgaismojumu.\r\n\r\nĒrtākai un drošākai braukšanai:\r\nAklo zonu asistents\r\nJoslu maiņas brīdinājuma sistēma\r\n360 kameras ap auto\r\nInteliģentā kruīza kontrole\r\nApple CarPlay', 'BMW', '3 Series', 2021, 185222, 'Hibrīds', 0.0, 'Automāts', 'Balta', 24500.00, 'uploads/cars/car_69c95228aa7ec1.71035603.jpg', '2026-03-29 16:24:08'),
	(15, 14, 'Audi Q7 S-line, 3.0d, 200kw/272zs.', '– Sadarbībā ar mūsu partneriem iespējams saņemt izdevīgu auto līzingu vai naudas aizdevumu.\r\n\r\n– Pirms auto apskates lūgums sazināties ar mums.\r\n\r\nAprīkojums:\r\n\r\nS line pakotne\r\nQuattro pilnpiedziņa\r\n8-pakāpju automātiskā ātrumkārba\r\nAdaptīvā pneimatiskā piekare (air suspension)\r\n7 sēdvietas (3 sēdekļu rindas)\r\nSporta priekšējie sēdekļi (elektriski regulējami)\r\nSēdekļu apsilde priekšā un aizmugurē\r\n4 zonu klimata kontrole\r\nAutonomā apsilde (Webasto)\r\nKeyless Go (bezatslēgas piekļuve)\r\nElektrisks bagāžnieks\r\nHD Matrix LED lukturi\r\nLED aizmugurējie lukturi\r\nHead-up displejs\r\nDigitālais panelis (Virtual Cockpit)\r\nMMI Navigation Plus ar touch\r\nAdaptīvā kruīza kontrole (ACC)\r\nParkošanās asistents + atpakaļskata kamera\r\nJoslu uzturēšanas asistents\r\nJoslu maiņas asistents (aklā zona)\r\nCeļa zīmju atpazīšana\r\nAmbientais salona apgaismojums\r\nTonēti aizmugures stikli\r\nAugstas klases audio sistēma (Bose)\r\nAudi Connect', 'Audi', 'Q7', 2015, 320255, 'Dīzelis', 3.0, 'Automāts', 'Melna', 18000.00, 'uploads/cars/car_69d126580334d3.15073423.jpg', '2026-04-04 14:55:20'),
	(16, 14, 'Mercedes Benz E 220d 4Matic Coupe (W213) ss.com', 'Pārdod Mercedes Benz E 220d 4Matic Coupe (W213) teicamā stāvoklī un ar mazu nobraukumu. Ražotāja garantija līdz 11/2026. Auto ar pārskatāmu vēsturi, apkopes viektas tikai Mercedes autorizētā servisā. Auto ekspluatēts Vācijā. AMG pakotne, 19" AMG vieglmetāla diski, LED Multibeam adaptīvie lukturi, panorāmas stikla lūka, atpakaļskata kamera, Apple CarPlay/Android Auto, parkošanās sensori, aklo zonu asistents, kruīza kontrole, joslu asistents u. c. ekstras.\r\n\r\nIespējama apdrošināšanas un līzinga noformēšana uz vietas.\r\n\r\nPirms automašīnas apskates lūdzam sazināties ar mums.\r\n\r\nAuto komplektācija:\r\n\r\n02B operators manual and service booklet german\r\n08U mbconnect - services for vehicle setup\r\n09U mbconnect - vehicle monitoring\r\n149U polar white\r\n15U pre-installation smartphone integration mb link\r\n218 rear-view camera\r\n234 blind spot assistant\r\n235 active park assist\r\n246 analog clock\r\n255U mb mobilo with dsb and ggd\r\n258 collis. Warn. Sys. W/ active brake interv. Fcw stop\r\n287 through-loading feature\r\n2XXL federal republic of germany\r\n309 cup holder\r\n30P compartment package\r\n332B instrument cluster/hu language - german\r\n367 live traffic capability\r\n413 panoramic sliding sunroof/glass sunroof\r\n421 9-speed automatic transmission\r\n440 tempomat (cruise control)\r\n474 diesel particulate filter\r\n475 tire pressure control\r\n500 electric folding outside mirror\r\n51U black fabric roof interior trim\r\n628 automatic high beam switch plus (ihc+)\r\n642 dynamic led headlamps\r\n677 avantgarde/standard suspension\r\n772 amg styling package-front spoiler, side skirt\r\n776 wheel arch enlargement\r\n873 seat heater for left and right front seats\r\n874 magic vision ctrl incl. Heated wshld washer sys.\r\n891 premium ambiance illumination\r\n8U8 i-size-marking (isofix successor)\r\nA104 noise-optimized toothing\r\nB59 transmission mode selector lever (agility select)\r\nH40 trim pieces - aluminum galaxy (2b25)\r\nL left-hand steering\r\nL5C multifunction steer. Wheel - leather deep embossed\r\nM005 vehicles with 4-matic-/all wheel drive\r\nP29 amg line interior/amg sports package interior\r\nP31 amg line exterior/amg sports package exterior\r\nP35 light package (ffo)\r\nP44 parking package\r\nP49 mirrors package\r\nP65 ergonomics package\r\nR66 tire with run-flat properties\r\nRTD 19" amg double-spoke wheel mixed tires\r\nU12 floor mats - velour\r\nU22 lumbar support adjustment\r\nU60 pedestrian protection - active engine hood\r\nU79 diesel exhaust treatment bluetec scr generation 3\r\nU85 large scr tank reservoir', 'Mercedes-Benz', 'E-Class', 2019, 44160, 'Dīzelis', 2.0, 'Automāts', 'Balta', 40000.00, 'uploads/cars/car_69d131e4e33f70.83470771.jpg', '2026-04-04 15:44:36');

-- Дамп структуры для таблица nn_auto.favorites
CREATE TABLE IF NOT EXISTS `favorites` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Ieraksta identifikators',
  `user_id` int(11) NOT NULL COMMENT 'Lietotāja identifikators',
  `car_id` int(11) NOT NULL COMMENT 'Saglabātā automobiļa identifikators',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Saglabāšanas datums un laiks',
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_favorite` (`user_id`,`car_id`),
  KEY `car_id` (`car_id`),
  CONSTRAINT `favorites_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `favorites_ibfk_2` FOREIGN KEY (`car_id`) REFERENCES `cars` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Дамп данных таблицы nn_auto.favorites: ~0 rows (приблизительно)

-- Дамп структуры для таблица nn_auto.model
CREATE TABLE IF NOT EXISTS `model` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand_id` int(11) NOT NULL,
  `model_name` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_brand_model` (`brand_id`,`model_name`) USING BTREE,
  KEY `idx_model_brand_id` (`brand_id`),
  CONSTRAINT `fk_model_brand` FOREIGN KEY (`brand_id`) REFERENCES `brand` (`brand_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1024 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Дамп данных таблицы nn_auto.model: ~564 rows (приблизительно)
INSERT INTO `model` (`id`, `brand_id`, `model_name`) VALUES
	(1, 1, '500'),
	(2, 1, '595'),
	(3, 1, '695'),
	(4, 1, 'Punto Evo'),
	(5, 2, '147'),
	(6, 2, '156'),
	(7, 2, '159'),
	(8, 2, 'Giulietta'),
	(9, 2, 'Giulia'),
	(10, 2, 'MiTo'),
	(11, 2, 'Stelvio'),
	(12, 2, 'Brera'),
	(13, 2, 'Spider'),
	(14, 2, 'GT'),
	(15, 3, '80'),
	(16, 3, '100'),
	(17, 3, 'A1'),
	(18, 3, 'A2'),
	(19, 3, 'A3'),
	(20, 3, 'A4'),
	(21, 3, 'A5'),
	(22, 3, 'A6'),
	(23, 3, 'A7'),
	(24, 3, 'A8'),
	(25, 3, 'Q2'),
	(26, 3, 'Q3'),
	(27, 3, 'Q5'),
	(28, 3, 'Q7'),
	(29, 3, 'Q8'),
	(30, 3, 'TT'),
	(31, 3, 'R8'),
	(32, 3, 'e-tron'),
	(33, 4, 'Bentayga'),
	(34, 4, 'Continental GT'),
	(35, 4, 'Flying Spur'),
	(36, 4, 'Mulsanne'),
	(37, 5, '1 Series'),
	(38, 5, '2 Series'),
	(39, 5, '3 Series'),
	(40, 5, '4 Series'),
	(41, 5, '5 Series'),
	(42, 5, '6 Series'),
	(43, 5, '7 Series'),
	(44, 5, '8 Series'),
	(45, 5, 'X1'),
	(46, 5, 'X2'),
	(47, 5, 'X3'),
	(48, 5, 'X4'),
	(49, 5, 'X5'),
	(50, 5, 'X6'),
	(51, 5, 'X7'),
	(52, 5, 'Z3'),
	(53, 5, 'Z4'),
	(54, 5, 'i3'),
	(55, 5, 'i4'),
	(56, 5, 'i7'),
	(57, 5, 'iX'),
	(58, 5, 'XM'),
	(59, 6, 'Chiron'),
	(60, 6, 'Veyron'),
	(61, 6, 'Divo'),
	(62, 7, 'ATS'),
	(63, 7, 'CT4'),
	(64, 7, 'CT5'),
	(65, 7, 'Escalade'),
	(66, 7, 'XT4'),
	(67, 7, 'XT5'),
	(68, 7, 'XT6'),
	(69, 8, 'Aveo'),
	(70, 8, 'Camaro'),
	(71, 8, 'Captiva'),
	(72, 8, 'Cruze'),
	(73, 8, 'Epica'),
	(74, 8, 'Lacetti'),
	(75, 8, 'Malibu'),
	(76, 8, 'Orlando'),
	(77, 8, 'Spark'),
	(78, 8, 'Tahoe'),
	(79, 8, 'TrailBlazer'),
	(80, 9, '300'),
	(81, 9, 'Crossfire'),
	(82, 9, 'Grand Voyager'),
	(83, 9, 'Pacifica'),
	(84, 9, 'PT Cruiser'),
	(85, 9, 'Voyager'),
	(86, 10, 'Berlingo'),
	(87, 10, 'C1'),
	(88, 10, 'C2'),
	(89, 10, 'C3'),
	(90, 10, 'C3 Aircross'),
	(91, 10, 'C4'),
	(92, 10, 'C4 Cactus'),
	(93, 10, 'C5'),
	(94, 10, 'C5 Aircross'),
	(95, 10, 'C8'),
	(96, 10, 'DS3'),
	(97, 10, 'DS4'),
	(98, 10, 'DS5'),
	(99, 10, 'Jumper'),
	(100, 10, 'Jumpy'),
	(101, 11, 'Ateca'),
	(102, 11, 'Born'),
	(103, 11, 'Formentor'),
	(104, 11, 'Leon'),
	(105, 11, 'Terramar'),
	(106, 12, 'Dokker'),
	(107, 12, 'Duster'),
	(108, 12, 'Jogger'),
	(109, 12, 'Lodgy'),
	(110, 12, 'Logan'),
	(111, 12, 'Sandero'),
	(112, 12, 'Spring'),
	(113, 13, 'Caliber'),
	(114, 13, 'Challenger'),
	(115, 13, 'Charger'),
	(116, 13, 'Durango'),
	(117, 13, 'Journey'),
	(118, 13, 'Nitro'),
	(119, 13, 'RAM'),
	(120, 14, '296 GTB'),
	(121, 14, '458 Italia'),
	(122, 14, '488 GTB'),
	(123, 14, '812 Superfast'),
	(124, 14, 'California'),
	(125, 14, 'F8 Tributo'),
	(126, 14, 'Portofino'),
	(127, 14, 'Roma'),
	(128, 14, 'SF90 Stradale'),
	(129, 15, '500'),
	(130, 15, '500X'),
	(131, 15, 'Albea'),
	(132, 15, 'Bravo'),
	(133, 15, 'Doblo'),
	(134, 15, 'Ducato'),
	(135, 15, 'Fiorino'),
	(136, 15, 'Freemont'),
	(137, 15, 'Linea'),
	(138, 15, 'Panda'),
	(139, 15, 'Punto'),
	(140, 15, 'Scudo'),
	(141, 15, 'Tipo'),
	(142, 16, 'B-Max'),
	(143, 16, 'C-Max'),
	(144, 16, 'EcoSport'),
	(145, 16, 'Edge'),
	(146, 16, 'Escape'),
	(147, 16, 'Expedition'),
	(148, 16, 'Explorer'),
	(149, 16, 'Fiesta'),
	(150, 16, 'Focus'),
	(151, 16, 'Fusion'),
	(152, 16, 'Galaxy'),
	(153, 16, 'Ka'),
	(154, 16, 'Kuga'),
	(155, 16, 'Mondeo'),
	(156, 16, 'Mustang'),
	(157, 16, 'Puma'),
	(158, 16, 'Ranger'),
	(159, 16, 'S-Max'),
	(160, 16, 'Tourneo Connect'),
	(161, 16, 'Transit'),
	(162, 17, 'G70'),
	(163, 17, 'G80'),
	(164, 17, 'G90'),
	(165, 17, 'GV60'),
	(166, 17, 'GV70'),
	(167, 17, 'GV80'),
	(168, 18, 'Acadia'),
	(169, 18, 'Canyon'),
	(170, 18, 'Sierra'),
	(171, 18, 'Terrain'),
	(172, 18, 'Yukon'),
	(173, 19, 'Accord'),
	(174, 19, 'Civic'),
	(175, 19, 'CR-V'),
	(176, 19, 'CR-Z'),
	(177, 19, 'FR-V'),
	(178, 19, 'HR-V'),
	(179, 19, 'Insight'),
	(180, 19, 'Jazz'),
	(181, 19, 'Legend'),
	(182, 19, 'Pilot'),
	(183, 19, 'Prelude'),
	(184, 20, 'Accent'),
	(185, 20, 'Bayon'),
	(186, 20, 'Coupe'),
	(187, 20, 'Elantra'),
	(188, 20, 'Getz'),
	(189, 20, 'H-1'),
	(190, 20, 'i10'),
	(191, 20, 'i20'),
	(192, 20, 'i30'),
	(193, 20, 'i40'),
	(194, 20, 'IONIQ'),
	(195, 20, 'IONIQ 5'),
	(196, 20, 'IONIQ 6'),
	(197, 20, 'ix35'),
	(198, 20, 'Kona'),
	(199, 20, 'Matrix'),
	(200, 20, 'Santa Fe'),
	(201, 20, 'Sonata'),
	(202, 20, 'Terracan'),
	(203, 20, 'Tucson'),
	(204, 20, 'Veloster'),
	(205, 21, 'EX'),
	(206, 21, 'FX'),
	(207, 21, 'G'),
	(208, 21, 'M'),
	(209, 21, 'Q30'),
	(210, 21, 'Q50'),
	(211, 21, 'Q60'),
	(212, 21, 'Q70'),
	(213, 21, 'QX30'),
	(214, 21, 'QX50'),
	(215, 21, 'QX60'),
	(216, 21, 'QX70'),
	(217, 21, 'QX80'),
	(218, 22, 'E-Pace'),
	(219, 22, 'F-Pace'),
	(220, 22, 'F-Type'),
	(221, 22, 'I-Pace'),
	(222, 22, 'S-Type'),
	(223, 22, 'XE'),
	(224, 22, 'XF'),
	(225, 22, 'XJ'),
	(226, 22, 'XK'),
	(227, 23, 'Cherokee'),
	(228, 23, 'Compass'),
	(229, 23, 'Gladiator'),
	(230, 23, 'Grand Cherokee'),
	(231, 23, 'Liberty'),
	(232, 23, 'Patriot'),
	(233, 23, 'Renegade'),
	(234, 23, 'Wrangler'),
	(235, 24, 'Carens'),
	(236, 24, 'Carnival'),
	(237, 24, 'Ceed'),
	(238, 24, 'Cerato'),
	(239, 24, 'EV6'),
	(240, 24, 'Magentis'),
	(241, 24, 'Niro'),
	(242, 24, 'Optima'),
	(243, 24, 'Picanto'),
	(244, 24, 'ProCeed'),
	(245, 24, 'Rio'),
	(246, 24, 'Sorento'),
	(247, 24, 'Soul'),
	(248, 24, 'Sportage'),
	(249, 24, 'Stinger'),
	(250, 24, 'Stonic'),
	(251, 24, 'Venga'),
	(252, 24, 'XCeed'),
	(253, 25, 'Aventador'),
	(254, 25, 'Gallardo'),
	(255, 25, 'Huracan'),
	(256, 25, 'Revuelto'),
	(257, 25, 'Urus'),
	(258, 26, 'Defender'),
	(259, 26, 'Discovery'),
	(260, 26, 'Discovery Sport'),
	(261, 26, 'Freelander'),
	(262, 26, 'Range Rover'),
	(263, 26, 'Range Rover Evoque'),
	(264, 26, 'Range Rover Sport'),
	(265, 26, 'Range Rover Velar'),
	(266, 27, 'CT'),
	(267, 27, 'ES'),
	(268, 27, 'GS'),
	(269, 27, 'GX'),
	(270, 27, 'IS'),
	(271, 27, 'LC'),
	(272, 27, 'LS'),
	(273, 27, 'LX'),
	(274, 27, 'NX'),
	(275, 27, 'RC'),
	(276, 27, 'RX'),
	(277, 27, 'UX'),
	(278, 28, 'Ghibli'),
	(279, 28, 'GranCabrio'),
	(280, 28, 'GranTurismo'),
	(281, 28, 'Grecale'),
	(282, 28, 'Levante'),
	(283, 28, 'MC20'),
	(284, 28, 'Quattroporte'),
	(285, 29, '2'),
	(286, 29, '3'),
	(287, 29, '5'),
	(288, 29, '6'),
	(289, 29, '626'),
	(290, 29, 'BT-50'),
	(291, 29, 'CX-3'),
	(292, 29, 'CX-30'),
	(293, 29, 'CX-5'),
	(294, 29, 'CX-7'),
	(295, 29, 'CX-60'),
	(296, 29, 'CX-80'),
	(297, 29, 'MX-5'),
	(298, 29, 'Premacy'),
	(299, 29, 'RX-8'),
	(300, 29, 'Tribute'),
	(301, 30, '570S'),
	(302, 30, '600LT'),
	(303, 30, '720S'),
	(304, 30, '750S'),
	(305, 30, 'Artura'),
	(306, 30, 'GT'),
	(307, 30, 'P1'),
	(308, 31, 'A-Class'),
	(309, 31, 'AMG GT'),
	(310, 31, 'B-Class'),
	(311, 31, 'C-Class'),
	(312, 31, 'CLA'),
	(313, 31, 'CLC'),
	(314, 31, 'CLK'),
	(315, 31, 'CLS'),
	(316, 31, 'E-Class'),
	(317, 31, 'G-Class'),
	(318, 31, 'GLA'),
	(319, 31, 'GLB'),
	(320, 31, 'GLC'),
	(321, 31, 'GLE'),
	(322, 31, 'GLK'),
	(323, 31, 'GLS'),
	(324, 31, 'ML'),
	(325, 31, 'R-Class'),
	(326, 31, 'S-Class'),
	(327, 31, 'SL'),
	(328, 31, 'SLK'),
	(329, 31, 'Sprinter'),
	(330, 31, 'V-Class'),
	(331, 31, 'Vito'),
	(332, 31, 'EQC'),
	(333, 31, 'EQA'),
	(334, 31, 'EQB'),
	(335, 31, 'EQE'),
	(336, 31, 'EQS'),
	(337, 32, 'Clubman'),
	(338, 32, 'Cooper'),
	(339, 32, 'Countryman'),
	(340, 32, 'Coupe'),
	(341, 32, 'Paceman'),
	(342, 32, 'Roadster'),
	(343, 33, 'ASX'),
	(344, 33, 'Carisma'),
	(345, 33, 'Colt'),
	(346, 33, 'Eclipse Cross'),
	(347, 33, 'Galant'),
	(348, 33, 'Grandis'),
	(349, 33, 'L200'),
	(350, 33, 'Lancer'),
	(351, 33, 'Outlander'),
	(352, 33, 'Pajero'),
	(353, 33, 'Space Star'),
	(354, 34, '370Z'),
	(355, 34, 'Almera'),
	(356, 34, 'Cube'),
	(357, 34, 'GT-R'),
	(358, 34, 'Juke'),
	(359, 34, 'Leaf'),
	(360, 34, 'Micra'),
	(361, 34, 'Murano'),
	(362, 34, 'Navara'),
	(363, 34, 'Note'),
	(364, 34, 'Pathfinder'),
	(365, 34, 'Patrol'),
	(366, 34, 'Primera'),
	(367, 34, 'Qashqai'),
	(368, 34, 'Terrano'),
	(369, 34, 'Tiida'),
	(370, 34, 'X-Trail'),
	(371, 35, 'Adam'),
	(372, 35, 'Antara'),
	(373, 35, 'Astra'),
	(374, 35, 'Combo'),
	(375, 35, 'Corsa'),
	(376, 35, 'Crossland'),
	(377, 35, 'Frontera'),
	(378, 35, 'Grandland'),
	(379, 35, 'Insignia'),
	(380, 35, 'Meriva'),
	(381, 35, 'Mokka'),
	(382, 35, 'Signum'),
	(383, 35, 'Vectra'),
	(384, 35, 'Vivaro'),
	(385, 35, 'Zafira'),
	(386, 36, '1007'),
	(387, 36, '107'),
	(388, 36, '108'),
	(389, 36, '2008'),
	(390, 36, '206'),
	(391, 36, '207'),
	(392, 36, '208'),
	(393, 36, '3008'),
	(394, 36, '301'),
	(395, 36, '307'),
	(396, 36, '308'),
	(397, 36, '4007'),
	(398, 36, '407'),
	(399, 36, '408'),
	(400, 36, '5008'),
	(401, 36, '508'),
	(402, 36, '607'),
	(403, 36, '807'),
	(404, 36, 'Boxer'),
	(405, 36, 'Expert'),
	(406, 36, 'Partner'),
	(407, 36, 'RCZ'),
	(408, 37, '718 Boxster'),
	(409, 37, '718 Cayman'),
	(410, 37, '911'),
	(411, 37, 'Boxster'),
	(412, 37, 'Cayenne'),
	(413, 37, 'Cayman'),
	(414, 37, 'Macan'),
	(415, 37, 'Panamera'),
	(416, 37, 'Taycan'),
	(417, 38, 'Arkana'),
	(418, 38, 'Austral'),
	(419, 38, 'Captur'),
	(420, 38, 'Clio'),
	(421, 38, 'Espace'),
	(422, 38, 'Fluence'),
	(423, 38, 'Grand Scenic'),
	(424, 38, 'Kadjar'),
	(425, 38, 'Kangoo'),
	(426, 38, 'Koleos'),
	(427, 38, 'Laguna'),
	(428, 38, 'Latitude'),
	(429, 38, 'Megane'),
	(430, 38, 'Modus'),
	(431, 38, 'Scenic'),
	(432, 38, 'Symbol'),
	(433, 38, 'Talisman'),
	(434, 38, 'Trafic'),
	(435, 38, 'Twingo'),
	(436, 38, 'Vel Satis'),
	(437, 38, 'Zoe'),
	(438, 39, 'Cullinan'),
	(439, 39, 'Dawn'),
	(440, 39, 'Ghost'),
	(441, 39, 'Phantom'),
	(442, 39, 'Spectre'),
	(443, 39, 'Wraith'),
	(444, 40, 'Alhambra'),
	(445, 40, 'Altea'),
	(446, 40, 'Arona'),
	(447, 40, 'Ateca'),
	(448, 40, 'Cordoba'),
	(449, 40, 'Exeo'),
	(450, 40, 'Ibiza'),
	(451, 40, 'Leon'),
	(452, 40, 'Mii'),
	(453, 40, 'Tarraco'),
	(454, 40, 'Toledo'),
	(455, 41, 'Citigo'),
	(456, 41, 'Fabia'),
	(457, 41, 'Kamiq'),
	(458, 41, 'Karoq'),
	(459, 41, 'Kodiaq'),
	(460, 41, 'Octavia'),
	(461, 41, 'Rapid'),
	(462, 41, 'Roomster'),
	(463, 41, 'Scala'),
	(464, 41, 'Superb'),
	(465, 41, 'Yeti'),
	(466, 41, 'Enyaq'),
	(467, 42, 'ForFour'),
	(468, 42, 'ForTwo'),
	(469, 42, 'Roadster'),
	(470, 43, 'BRZ'),
	(471, 43, 'Forester'),
	(472, 43, 'Impreza'),
	(473, 43, 'Legacy'),
	(474, 43, 'Levorg'),
	(475, 43, 'Outback'),
	(476, 43, 'Tribeca'),
	(477, 43, 'WRX'),
	(478, 43, 'XV'),
	(479, 44, 'Across'),
	(480, 44, 'Alto'),
	(481, 44, 'Baleno'),
	(482, 44, 'Grand Vitara'),
	(483, 44, 'Ignis'),
	(484, 44, 'Jimny'),
	(485, 44, 'Kizashi'),
	(486, 44, 'Liana'),
	(487, 44, 'S-Cross'),
	(488, 44, 'Splash'),
	(489, 44, 'Swift'),
	(490, 44, 'SX4'),
	(491, 44, 'Vitara'),
	(492, 44, 'Wagon R'),
	(493, 45, 'Model 3'),
	(494, 45, 'Model S'),
	(495, 45, 'Model X'),
	(496, 45, 'Model Y'),
	(497, 45, 'Roadster'),
	(498, 45, 'Cybertruck'),
	(499, 46, 'Auris'),
	(500, 46, 'Avensis'),
	(501, 46, 'Aygo'),
	(502, 46, 'bZ4X'),
	(503, 46, 'C-HR'),
	(504, 46, 'Camry'),
	(505, 46, 'Celica'),
	(506, 46, 'Corolla'),
	(507, 46, 'Hilux'),
	(508, 46, 'Highlander'),
	(509, 46, 'Land Cruiser'),
	(510, 46, 'Prius'),
	(511, 46, 'Proace'),
	(512, 46, 'RAV4'),
	(513, 46, 'Supra'),
	(514, 46, 'Urban Cruiser'),
	(515, 46, 'Verso'),
	(516, 46, 'Yaris'),
	(517, 47, 'Amarok'),
	(518, 47, 'Arteon'),
	(519, 47, 'Beetle'),
	(520, 47, 'Bora'),
	(521, 47, 'Caddy'),
	(522, 47, 'Crafter'),
	(523, 47, 'EOS'),
	(524, 47, 'Fox'),
	(525, 47, 'Golf'),
	(526, 47, 'ID.3'),
	(527, 47, 'ID.4'),
	(528, 47, 'ID.5'),
	(529, 47, 'ID.7'),
	(530, 47, 'Jetta'),
	(531, 47, 'Multivan'),
	(532, 47, 'Passat'),
	(533, 47, 'Phaeton'),
	(534, 47, 'Polo'),
	(535, 47, 'Scirocco'),
	(536, 47, 'Sharan'),
	(537, 47, 'Taigo'),
	(538, 47, 'T-Cross'),
	(539, 47, 'Tiguan'),
	(540, 47, 'Touareg'),
	(541, 47, 'Touran'),
	(542, 47, 'Transporter'),
	(543, 47, 'T-Roc'),
	(544, 47, 'Up'),
	(545, 48, '240'),
	(546, 48, '440'),
	(547, 48, '460'),
	(548, 48, '740'),
	(549, 48, '850'),
	(550, 48, 'C30'),
	(551, 48, 'C40'),
	(552, 48, 'S40'),
	(553, 48, 'S60'),
	(554, 48, 'S80'),
	(555, 48, 'S90'),
	(556, 48, 'V40'),
	(557, 48, 'V50'),
	(558, 48, 'V60'),
	(559, 48, 'V70'),
	(560, 48, 'V90'),
	(561, 48, 'XC40'),
	(562, 48, 'XC60'),
	(563, 48, 'XC70'),
	(564, 48, 'XC90');

-- Дамп структуры для таблица nn_auto.support_messages
CREATE TABLE IF NOT EXISTS `support_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Ziņojuma identifikators',
  `user_id` int(11) NOT NULL COMMENT 'Lietotājs, kurš iesūtījis paziņojumu',
  `message` text NOT NULL COMMENT 'Lietotāja sūtītais ziņojums atbalsta dienestam',
  `admin_reply` text DEFAULT NULL COMMENT 'Administrācijas atbilde lietotājam',
  `status` enum('open','answered','closed') DEFAULT 'open' COMMENT 'Ziņojuma statuss',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() COMMENT 'Izveides datums',
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Pēdējās izmaiņas datums',
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  CONSTRAINT `support_messages_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- Дамп данных таблицы nn_auto.support_messages: ~4 rows (приблизительно)
INSERT INTO `support_messages` (`id`, `user_id`, `message`, `admin_reply`, `status`, `created_at`, `updated_at`) VALUES
	(9, 14, 'Sveiks, man ir problema', 'Sveiks, kada jums ir problema?', 'closed', '2026-04-04 19:33:07', '2026-04-04 19:37:31'),
	(10, 14, 'Nevaru, publicet sludinajumu', 'Pameģini', 'closed', '2026-04-04 19:34:11', '2026-04-04 19:37:31'),
	(11, 14, 'Hallo', 'Hallo', 'closed', '2026-04-04 19:34:54', '2026-04-04 19:37:31'),
	(12, 14, 'Tehniskas problemas', '123', 'closed', '2026-04-04 19:37:01', '2026-04-04 19:37:31');

