--
-- Host: localhost    Database: myve
-- ------------------------------------------------------


--
-- Table structure for table `OnTheRoad`
--

CREATE TABLE `OnTheRoad` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_from` datetime DEFAULT NULL,
  `date_to` datetime DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `for_user_id` int(11) DEFAULT NULL,
  `status` int(11) NOT NULL,
  `score` int(11) DEFAULT NULL,
  `data` longtext,
  `young_driver` tinyint(4) NOT NULL,
  `other` longtext,
  `person_name` varchar(255) NOT NULL,
  `person_email` varchar(255) NOT NULL,
  `person_phone` varchar(20) NOT NULL,
  `person_license_plate` varchar(10) NOT NULL,
  `person_brand` int(11) NOT NULL,
  `person_model` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=243 DEFAULT CHARSET=utf8;

--
-- Table structure for table `ads_unsubscribed`
--

CREATE TABLE `ads_unsubscribed` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6519 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `alignment_admin_access`
--

CREATE TABLE `alignment_admin_access` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_admin` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_userid_useremail` (`product_id`,`user_id`,`user_email`),
  KEY `emails` (`user_email`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `alignment_product_settings`
--

CREATE TABLE `alignment_product_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `lanes` tinyint(4) NOT NULL,
  `slot` int(11) NOT NULL,
  `prices` text COLLATE utf8_unicode_ci NOT NULL,
  `gas_available` tinyint(2) NOT NULL DEFAULT '1',
  `active_promo_codes` text COLLATE utf8_unicode_ci NOT NULL,
  `offset_reservation` int(11) NOT NULL,
  `offset_admin` int(11) NOT NULL,
  `weeks_ahead` tinyint(4) NOT NULL,
  `sms` tinyint(4) NOT NULL,
  `sms_report` tinyint(4) NOT NULL,
  `sms_report_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sms_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sms_days` int(11) NOT NULL,
  `sms_template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `alignment_reservations`
--

CREATE TABLE `alignment_reservations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `alignment` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-front,\r\n2-back,\r\n4-front+back',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `shop` (`shop_id`) USING BTREE,
  KEY `license_plate_shop` (`license_plate`,`shop_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `alignment_reservations_canceled`
--

CREATE TABLE `alignment_reservations_canceled` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `alignment` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-front,\r\n2-back,\r\n4-front+back',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `deleted_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `alignment_reservations_deleted`
--

CREATE TABLE `alignment_reservations_deleted` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `altered_by_id` int(11) NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `alignment` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-front,\r\n2-back,\r\n4-front+back',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `og_created_at` int(11) NOT NULL,
  `og_updated_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `alignment_reservations_edited`
--

CREATE TABLE `alignment_reservations_edited` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `altered_by_id` int(11) NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `alignment` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-front,\r\n2-back,\r\n4-front+back',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `og_created_at` int(11) NOT NULL,
  `og_updated_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails`
--

CREATE TABLE `all_emails` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `from_chat` tinyint(4) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  KEY `date_of_insert` (`date_of_insert`)
) ENGINE=InnoDB AUTO_INCREMENT=8294115 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails_20240813`
--

CREATE TABLE `all_emails_20240813` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `from_chat` tinyint(4) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  KEY `date_of_insert` (`date_of_insert`)
) ENGINE=InnoDB AUTO_INCREMENT=3843673 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails_20250113`
--

CREATE TABLE `all_emails_20250113` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `from_chat` tinyint(4) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  KEY `date_of_insert` (`date_of_insert`)
) ENGINE=InnoDB AUTO_INCREMENT=5240024 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails_20250818`
--

CREATE TABLE `all_emails_20250818` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `from_chat` tinyint(4) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  KEY `date_of_insert` (`date_of_insert`)
) ENGINE=InnoDB AUTO_INCREMENT=7688789 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails_changed`
--

CREATE TABLE `all_emails_changed` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `all_emails_id` int(11) NOT NULL,
  `new_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `old_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `from_chat` tinyint(4) NOT NULL DEFAULT '0',
  `ads` tinyint(2) NOT NULL,
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  `changed_on` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=798 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails_deleted`
--

CREATE TABLE `all_emails_deleted` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `from_chat` tinyint(4) NOT NULL,
  `ads` tinyint(2) NOT NULL,
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  `deleted_on` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=888 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails_gkb`
--

CREATE TABLE `all_emails_gkb` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `ads` tinyint(2) NOT NULL,
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=433110 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `all_emails_temp`
--

CREATE TABLE `all_emails_temp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) CHARACTER SET utf8 NOT NULL,
  `from_users` int(1) NOT NULL DEFAULT '0',
  `from_gtp` int(1) NOT NULL DEFAULT '0',
  `from_fish` int(1) NOT NULL DEFAULT '0',
  `from_tax` int(1) NOT NULL DEFAULT '0',
  `from_chat` tinyint(4) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `all_emails_table` tinyint(2) NOT NULL DEFAULT '1',
  `date_of_insert` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `from_api` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=1956606 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `alldb`
--

CREATE TABLE `alldb` (
  `c1` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c2` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c3` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c4` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c5` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c6` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c7` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c8` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c9` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c10` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c11` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c12` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c13` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c14` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c15` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c16` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `c17` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  KEY `aa` (`c14`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `article_attempts`
--

CREATE TABLE `article_attempts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `model` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `style` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `prompt` varchar(2048) COLLATE utf8_unicode_ci NOT NULL,
  `article` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `article_prompts`
--

CREATE TABLE `article_prompts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `text` varchar(2048) COLLATE utf8_unicode_ci NOT NULL,
  `is_default` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `ati_tb`
--

CREATE TABLE `ati_tb` (
  `ID` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `regNum` varchar(10) NOT NULL,
  `phoneNumber` varchar(45) NOT NULL,
  `enNum` varchar(100) DEFAULT NULL,
  `createDate` date NOT NULL,
  `endDate` date NOT NULL,
  `oilChanged` smallint(1) NOT NULL DEFAULT '0',
  `description` varchar(255) DEFAULT NULL,
  `IsSendSMS` smallint(1) NOT NULL DEFAULT '0',
  `price` decimal(10,2) NOT NULL,
  `isInsurance` smallint(1) NOT NULL DEFAULT '0',
  `rootGUID` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `ID_UNIQUE` (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=12029 DEFAULT CHARSET=utf8;

--
-- Table structure for table `autoshow_game`
--

CREATE TABLE `autoshow_game` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniq_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(22) COLLATE utf8_unicode_ci NOT NULL,
  `terms` tinyint(4) NOT NULL,
  `image` text COLLATE utf8_unicode_ci NOT NULL,
  `qr_code` text COLLATE utf8_unicode_ci NOT NULL,
  `opened` int(11) NOT NULL,
  `clicked_link` int(11) NOT NULL,
  `mail_sent` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`uniq_id`)
) ENGINE=InnoDB AUTO_INCREMENT=257 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries`
--

CREATE TABLE `batteries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` int(11) NOT NULL,
  `series` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `vehicle_type` int(11) NOT NULL,
  `catalogue_number` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `short_code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `capacity` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `voltage` int(11) NOT NULL,
  `ah` int(11) NOT NULL,
  `starting_ah` int(11) NOT NULL,
  `length` int(11) NOT NULL,
  `width` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `polarity` tinyint(4) NOT NULL,
  `polarity_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `clamp_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `weight` float NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `is_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_20250623`
--

CREATE TABLE `batteries_20250623` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` int(11) NOT NULL,
  `series` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `vehicle_type` int(11) NOT NULL,
  `catalogue_number` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `short_code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `capacity` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `voltage` int(11) NOT NULL,
  `ah` int(11) NOT NULL,
  `starting_ah` int(11) NOT NULL,
  `length` int(11) NOT NULL,
  `width` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `polarity` tinyint(4) NOT NULL,
  `polarity_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `clamp_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `weight` float NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `is_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_20250825`
--

CREATE TABLE `batteries_20250825` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` int(11) NOT NULL,
  `series` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `vehicle_type` int(11) NOT NULL,
  `catalogue_number` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `short_code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `capacity` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `voltage` int(11) NOT NULL,
  `ah` int(11) NOT NULL,
  `starting_ah` int(11) NOT NULL,
  `length` int(11) NOT NULL,
  `width` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `polarity` tinyint(4) NOT NULL,
  `polarity_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `clamp_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `weight` float NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `is_active` (`is_active`)
) ENGINE=InnoDB AUTO_INCREMENT=228 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_brands`
--

CREATE TABLE `batteries_brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_prices`
--

CREATE TABLE `batteries_prices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `battery_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `cost` float NOT NULL,
  `price` float NOT NULL,
  `eco_price` float NOT NULL,
  `recomended_price` float NOT NULL,
  `warranty` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `battery_seller` (`battery_id`,`seller_id`) USING BTREE,
  KEY `seller_id` (`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=232 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_prices_20250623`
--

CREATE TABLE `batteries_prices_20250623` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `battery_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `cost` float NOT NULL,
  `price` float NOT NULL,
  `eco_price` float NOT NULL,
  `recomended_price` float NOT NULL,
  `warranty` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `battery_seller` (`battery_id`,`seller_id`) USING BTREE,
  KEY `seller_id` (`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=232 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_prices_20250825`
--

CREATE TABLE `batteries_prices_20250825` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `battery_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `cost` float NOT NULL,
  `price` float NOT NULL,
  `eco_price` float NOT NULL,
  `recomended_price` float NOT NULL,
  `warranty` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `battery_seller` (`battery_id`,`seller_id`) USING BTREE,
  KEY `seller_id` (`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=232 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_sellers`
--

CREATE TABLE `batteries_sellers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `viber` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `weight` int(11) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_series_pictures`
--

CREATE TABLE `batteries_series_pictures` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `series` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `polarity_type` int(11) NOT NULL,
  `image` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `batteries_vehicle_types`
--

CREATE TABLE `batteries_vehicle_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `weight` int(11) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `kind` tinyint(4) NOT NULL COMMENT '1-car, 2-motorbike',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(2014) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `meta_title` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `meta_description` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `delivery_times` int(11) NOT NULL,
  `on_index` tinyint(2) NOT NULL,
  `products_count_brands` int(11) NOT NULL,
  `sortorder` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=502 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `brands2`
--

CREATE TABLE `brands2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `kind` tinyint(4) NOT NULL COMMENT '1-car, 2-motorbike',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(2014) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `meta_title` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `meta_description` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `delivery_times` int(11) NOT NULL,
  `on_index` tinyint(2) NOT NULL,
  `products_count_brands` int(11) NOT NULL,
  `sortorder` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=498 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `brands_bckp_20230316`
--

CREATE TABLE `brands_bckp_20230316` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(2014) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `meta_title` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `meta_description` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `delivery_times` int(11) NOT NULL,
  `on_index` tinyint(2) NOT NULL,
  `products_count_brands` int(11) NOT NULL,
  `sortorder` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=143 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `brands_model`
--

CREATE TABLE `brands_model` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `old_id` int(11) NOT NULL COMMENT 'Това е ID-то което е motorbike_models от където трябва да взимаме спековете не трий',
  `kind` tinyint(4) NOT NULL DEFAULT '1',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16039 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `brands_model_motobike`
--

CREATE TABLE `brands_model_motobike` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6482 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `brands_motobike`
--

CREATE TABLE `brands_motobike` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(2014) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `meta_title` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `meta_description` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `delivery_times` int(11) NOT NULL,
  `on_index` tinyint(2) NOT NULL,
  `products_count_brands` int(11) NOT NULL,
  `sortorder` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=138 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cards`
--

CREATE TABLE `cards` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) NOT NULL,
  `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `client_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - потребител\r\n2 - корпоративен',
  `fields` text COLLATE utf8_unicode_ci NOT NULL,
  `validity_months` int(11) NOT NULL,
  `validity_offset_days` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `subtitle` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `additional_description_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `additional_description` text COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `price` decimal(12,2) NOT NULL,
  `additional_charge` decimal(12,2) NOT NULL,
  `commission_percent` decimal(12,2) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cards_error_log`
--

CREATE TABLE `cards_error_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `path` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cards_pending`
--

CREATE TABLE `cards_pending` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) NOT NULL,
  `card_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `checkout_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cards_purchases`
--

CREATE TABLE `cards_purchases` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniq_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `card_issued_id` int(11) NOT NULL,
  `collected_data` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `commission_percent` decimal(12,2) NOT NULL,
  `commission_value` decimal(12,2) NOT NULL,
  `price_total` decimal(12,2) NOT NULL,
  `price_adjusted` decimal(12,2) NOT NULL,
  `status` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniq_id` (`uniq_id`)
) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cards_tracking`
--

CREATE TABLE `cards_tracking` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `ip` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ref_one` text COLLATE utf8_unicode_ci NOT NULL,
  `ref_two` text COLLATE utf8_unicode_ci NOT NULL,
  `http_referer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `card_id` int(11) NOT NULL,
  `requested_info` tinyint(4) NOT NULL,
  `opened_buy_popup` int(11) NOT NULL,
  `submitted_details` tinyint(4) NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_generated` tinyint(4) NOT NULL,
  `seen_completed` tinyint(4) NOT NULL,
  `payment_paid` tinyint(4) NOT NULL,
  `current_step` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`checkout_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15111 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cards_vendors`
--

CREATE TABLE `cards_vendors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `payment_account` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `public_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `public_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `website` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `provider_info` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars`
--

CREATE TABLE `cars` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL DEFAULT '1' COMMENT '1 кола, 2 мотор',
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `number_plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rama` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(255) NOT NULL,
  `running_km` int(11) NOT NULL,
  `speed_box` tinyint(4) NOT NULL,
  `type_engine` tinyint(4) NOT NULL,
  `horse_power` int(11) NOT NULL,
  `eurostandart` tinyint(4) NOT NULL,
  `personal_car` tinyint(4) NOT NULL,
  `tyre_width` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_height` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_diameter` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type_engine_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `width_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `height_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `diameter_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_brand_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `events` varchar(2054) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `zastrahovatel` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `zastrahovka` text COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `block_reminder` tinyint(2) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `cars_table` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `gg` (`number_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=313058 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_20250130`
--

CREATE TABLE `cars_20250130` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL DEFAULT '1' COMMENT '1 кола, 2 мотор',
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `number_plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rama` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(255) NOT NULL,
  `running_km` int(11) NOT NULL,
  `speed_box` tinyint(4) NOT NULL,
  `type_engine` tinyint(4) NOT NULL,
  `horse_power` int(11) NOT NULL,
  `eurostandart` tinyint(4) NOT NULL,
  `personal_car` tinyint(4) NOT NULL,
  `tyre_width` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_height` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_diameter` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type_engine_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `width_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `height_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `diameter_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_brand_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `events` varchar(2054) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `zastrahovatel` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `zastrahovka` text COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `block_reminder` tinyint(2) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `cars_table` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `gg` (`number_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=234429 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_20250131`
--

CREATE TABLE `cars_20250131` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL DEFAULT '1' COMMENT '1 кола, 2 мотор',
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `number_plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rama` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(255) NOT NULL,
  `running_km` int(11) NOT NULL,
  `speed_box` tinyint(4) NOT NULL,
  `type_engine` tinyint(4) NOT NULL,
  `horse_power` int(11) NOT NULL,
  `eurostandart` tinyint(4) NOT NULL,
  `personal_car` tinyint(4) NOT NULL,
  `tyre_width` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_height` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_diameter` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type_engine_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `width_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `height_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `diameter_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_brand_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `events` varchar(2054) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `zastrahovatel` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `zastrahovka` text COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `block_reminder` tinyint(2) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `cars_table` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `gg` (`number_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=234579 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_20250529`
--

CREATE TABLE `cars_20250529` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL DEFAULT '1' COMMENT '1 кола, 2 мотор',
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `number_plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rama` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(255) NOT NULL,
  `running_km` int(11) NOT NULL,
  `speed_box` tinyint(4) NOT NULL,
  `type_engine` tinyint(4) NOT NULL,
  `horse_power` int(11) NOT NULL,
  `eurostandart` tinyint(4) NOT NULL,
  `personal_car` tinyint(4) NOT NULL,
  `tyre_width` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_height` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_diameter` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type_engine_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `width_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `height_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `diameter_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_brand_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `events` varchar(2054) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `zastrahovatel` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `zastrahovka` text COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `block_reminder` tinyint(2) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `cars_table` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `gg` (`number_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=273733 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_api`
--

CREATE TABLE `cars_api` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(11) NOT NULL,
  `fine_count` int(11) NOT NULL DEFAULT '0',
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9728 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `from_api_to_allmails` AFTER INSERT ON `cars_api` FOR EACH ROW INSERT INTO all_emails (email,from_api) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_api = 1 */;;
DELIMITER ;

--
-- Table structure for table `cars_api_latest`
--

CREATE TABLE `cars_api_latest` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(11) NOT NULL,
  `fine_count` int(11) NOT NULL DEFAULT '0',
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `latest_check` date NOT NULL,
  `notify` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `mail_license` (`email`,`license_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=16883 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_bckp20240102`
--

CREATE TABLE `cars_bckp20240102` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL DEFAULT '1' COMMENT '1 кола, 2 мотор',
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `number_plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rama` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(255) NOT NULL,
  `running_km` int(11) NOT NULL,
  `speed_box` tinyint(4) NOT NULL,
  `type_engine` tinyint(4) NOT NULL,
  `horse_power` int(11) NOT NULL,
  `eurostandart` tinyint(4) NOT NULL,
  `personal_car` tinyint(4) NOT NULL,
  `tyre_width` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_height` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_diameter` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type_engine_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `width_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `height_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `diameter_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_brand_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `events` varchar(2054) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `zastrahovatel` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `zastrahovka` text COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `block_reminder` tinyint(2) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `cars_table` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `gg` (`number_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=124604 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_deleted`
--

CREATE TABLE `cars_deleted` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL DEFAULT '1' COMMENT '1 кола, 2 мотор',
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `number_plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rama` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(255) NOT NULL,
  `running_km` int(11) NOT NULL,
  `speed_box` tinyint(4) NOT NULL,
  `type_engine` tinyint(4) NOT NULL,
  `horse_power` int(11) NOT NULL,
  `eurostandart` tinyint(4) NOT NULL,
  `personal_car` tinyint(4) NOT NULL,
  `tyre_width` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_height` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_diameter` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type_engine_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `width_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `height_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `diameter_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_brand_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `events` varchar(2054) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `zastrahovatel` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `zastrahovka` text COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `block_reminder` tinyint(2) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `cars_table` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `deleted_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `gg` (`number_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=312974 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_fish`
--

CREATE TABLE `cars_fish` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `egn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `knijka` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `last_status` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=146812 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `email_fish` AFTER INSERT ON `cars_fish` FOR EACH ROW INSERT INTO all_emails (email,from_fish) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_fish = 1 */;;
DELIMITER ;

--
-- Table structure for table `cars_fish_mails`
--

CREATE TABLE `cars_fish_mails` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19495 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_fish_reminder`
--

CREATE TABLE `cars_fish_reminder` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `egn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `knijka` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `latest_status` tinyint(2) NOT NULL COMMENT '1 -> няма акт, 2 -> има акт',
  `current_status` tinyint(2) NOT NULL,
  `email_send` tinyint(2) NOT NULL,
  `last_check_data` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `egn` (`egn`,`knijka`)
) ENGINE=InnoDB AUTO_INCREMENT=47163 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_gtp`
--

CREATE TABLE `cars_gtp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(1024) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `year_registration` varchar(255) NOT NULL,
  `license_plate` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `manul_save` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovatel` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `manual_event_date` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `gtp_table` tinyint(2) NOT NULL DEFAULT '1',
  `block_reminder` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `dd` (`license_plate`),
  KEY `email` (`email`(255))
) ENGINE=InnoDB AUTO_INCREMENT=291552 DEFAULT CHARSET=utf8;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `insert_gtp` AFTER INSERT ON `cars_gtp` FOR EACH ROW INSERT INTO all_emails (email,from_gtp) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_gtp = 1 */;;
DELIMITER ;

--
-- Table structure for table `cars_gtp_after`
--

CREATE TABLE `cars_gtp_after` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(1024) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `year_registration` varchar(255) NOT NULL,
  `license_plate` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `manul_save` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovatel` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `manual_event_date` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `gtp_table` tinyint(2) NOT NULL DEFAULT '1',
  `block_reminder` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `dd` (`license_plate`),
  KEY `email` (`email`(255))
) ENGINE=InnoDB AUTO_INCREMENT=177244 DEFAULT CHARSET=utf8;

--
-- Table structure for table `cars_gtp_before`
--

CREATE TABLE `cars_gtp_before` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(1024) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `year_registration` varchar(255) NOT NULL,
  `license_plate` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gtp_last_checked` int(11) NOT NULL,
  `gtp_response` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `vinetki` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `manul_save` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovatel` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zastrahovka_start` int(11) NOT NULL,
  `event_date_gtp` date NOT NULL,
  `event_date_zastrahovka` date NOT NULL,
  `event_date_vinetka` date NOT NULL,
  `manual_event_date` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `attempts` int(11) NOT NULL,
  `attempts_fill` int(11) NOT NULL,
  `last_attempt` int(11) NOT NULL,
  `ads` tinyint(2) NOT NULL DEFAULT '1',
  `gtp_table` tinyint(2) NOT NULL DEFAULT '1',
  `block_reminder` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `dd` (`license_plate`),
  KEY `email` (`email`(255))
) ENGINE=InnoDB AUTO_INCREMENT=177150 DEFAULT CHARSET=utf8;

--
-- Table structure for table `cars_gtp_mails`
--

CREATE TABLE `cars_gtp_mails` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_logo_pictures`
--

CREATE TABLE `cars_logo_pictures` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=24828 DEFAULT CHARSET=utf8;

--
-- Table structure for table `cars_rejected`
--

CREATE TABLE `cars_rejected` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `number_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(4) NOT NULL DEFAULT '0',
  `kind` tinyint(2) NOT NULL DEFAULT '1',
  `brand_id` int(11) NOT NULL DEFAULT '0',
  `model_id` int(11) NOT NULL DEFAULT '0',
  `power` int(11) NOT NULL,
  `eurostandart` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=31730 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_tyres`
--

CREATE TABLE `cars_tyres` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `car_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `width` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `height` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `diameter` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `season` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `mileage` int(11) NOT NULL,
  `dot` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `brand` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20929 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_vin`
--

CREATE TABLE `cars_vin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `vin` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `json` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate` (`plate`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9033 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_vin_attempts`
--

CREATE TABLE `cars_vin_attempts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `vin` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `json` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `plate` (`plate`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=9098 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `cars_vin_peugeot`
--

CREATE TABLE `cars_vin_peugeot` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `model` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `year` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `vin` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6424 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `catalog_orders`
--

CREATE TABLE `catalog_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=743 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text NOT NULL,
  `logo` text NOT NULL,
  `new_logo` varchar(2056) NOT NULL,
  `sizes` varchar(1024) NOT NULL,
  `icon` varchar(255) NOT NULL,
  `icon_white` varchar(255) NOT NULL,
  `sortorder` int(11) NOT NULL,
  `path` varchar(512) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `in_main_menu` tinyint(4) NOT NULL,
  `is_tree_end` tinyint(1) NOT NULL,
  `weight` int(11) NOT NULL,
  `weight_banner` int(11) NOT NULL,
  `products_count` int(11) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `meta_title` varchar(1024) NOT NULL,
  `meta_description` varchar(1024) NOT NULL,
  `tag` varchar(255) NOT NULL,
  `after_banner` tinyint(2) NOT NULL,
  `b2b` varchar(512) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `chargers`
--

CREATE TABLE `chargers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `price` double NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `part_number` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `free_delivery` tinyint(4) NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `sortorder` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=171 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `chargers_characheristic_main`
--

CREATE TABLE `chargers_characheristic_main` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `charger_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `kind` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sortorder` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=687 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `chargers_characheristic_sub`
--

CREATE TABLE `chargers_characheristic_sub` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `charger_id` int(11) NOT NULL,
  `title` text COLLATE utf8_unicode_ci NOT NULL,
  `sortorder` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `chargers_orders`
--

CREATE TABLE `chargers_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `tos` text COLLATE utf8_unicode_ci NOT NULL,
  `post` text COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1759 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `chargers_suppliers`
--

CREATE TABLE `chargers_suppliers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `viber` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `chargers_types`
--

CREATE TABLE `chargers_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `code_order` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `success` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `chat_gpt`
--

CREATE TABLE `chat_gpt` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `uniq_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `chat_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `chat` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `chat_id` (`chat_id`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=51332 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `update_all_emails` AFTER UPDATE ON `chat_gpt` FOR EACH ROW IF NEW.email IS NOT NULL AND NEW.email != '' AND NEW.updated_at IS NOT NULL AND NEW.updated_at != 0 AND OLD.updated_at = 0 THEN
    INSERT INTO all_emails (email, from_chat) VALUES (NEW.email, 1)
    ON DUPLICATE KEY UPDATE from_chat = 1;
  END IF */;;
DELIMITER ;

--
-- Table structure for table `chat_gpt_registered`
--

CREATE TABLE `chat_gpt_registered` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_eco`
--

CREATE TABLE `checks_eco` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `category` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL,
  `json` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate` (`plate`)
) ENGINE=InnoDB AUTO_INCREMENT=749235 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_egn_license_all`
--

CREATE TABLE `checks_egn_license_all` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - Driving License\r\n2 - ID Number\r\n3 - Foreign Car Plate\r\n4 - Uridichesko',
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `origin` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_at` (`type`,`created_at`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2330373 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `checks_egn_license_emails_all` AFTER INSERT ON `checks_egn_license_all` FOR EACH ROW INSERT INTO all_emails (email,from_fish) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_fish = 1 */;;
DELIMITER ;

--
-- Table structure for table `checks_egn_license_unique`
--

CREATE TABLE `checks_egn_license_unique` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Can be driving license, ID number or Foreing Car Plate',
  `eik` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - Driving License\r\n2 - ID Number\r\n3 - Foreign Car Plate\r\n4 - Uiridichesko',
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`egn`,`driving_license`,`eik`,`email`,`type`) USING BTREE,
  KEY `date` (`event_date`),
  KEY `email` (`email`),
  KEY `email_2` (`email`,`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2336893 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_egn_license_unique2`
--

CREATE TABLE `checks_egn_license_unique2` (
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  UNIQUE KEY `main` (`egn`,`driving_license`,`email`,`type`),
  KEY `date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_egn_license_unique_20240813`
--

CREATE TABLE `checks_egn_license_unique_20240813` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Can be driving license, ID number or Foreing Car Plate',
  `eik` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - Driving License\r\n2 - ID Number\r\n3 - Foreign Car Plate\r\n4 - Uiridichesko',
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`egn`,`driving_license`,`eik`,`email`,`type`) USING BTREE,
  KEY `date` (`event_date`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=899255 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_egn_license_unique_before_corporate`
--

CREATE TABLE `checks_egn_license_unique_before_corporate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Can be driving license, ID number or Foreing Car Plate',
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - Driving License\r\n2 - ID Number\r\n3 - Foreign Car Plate',
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`egn`,`driving_license`,`email`,`type`),
  KEY `date` (`event_date`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=840344 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_egn_license_unique_before_type`
--

CREATE TABLE `checks_egn_license_unique_before_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Can be driving license, ID number or Foreing Car Plate',
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`egn`,`driving_license`,`email`,`type`),
  KEY `date` (`event_date`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=348956 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_failed`
--

CREATE TABLE `checks_failed` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `error` text COLLATE utf8_unicode_ci NOT NULL,
  `error_code` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `recheck_attempts` tinyint(2) NOT NULL,
  `recheck_success` tinyint(2) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=438123 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_failed_gtp_problem`
--

CREATE TABLE `checks_failed_gtp_problem` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `error` text COLLATE utf8_unicode_ci NOT NULL,
  `error_code` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `recheck_attempts` tinyint(2) NOT NULL,
  `recheck_success` tinyint(2) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=41730 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_gtp`
--

CREATE TABLE `checks_gtp` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `json_data` text NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_gtp_20250108`
--

CREATE TABLE `checks_gtp_20250108` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_gtp_20250228`
--

CREATE TABLE `checks_gtp_20250228` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `json_data` text NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_gtp_20250728`
--

CREATE TABLE `checks_gtp_20250728` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `json_data` text NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_gtp_c_issue`
--

CREATE TABLE `checks_gtp_c_issue` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `success` tinyint(4) NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date_after` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`),
  KEY `success` (`success`,`attempts`,`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=14075 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_ips`
--

CREATE TABLE `checks_ips` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `license` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `origin` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `ip` (`ip`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=4142876 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_kat`
--

CREATE TABLE `checks_kat` (
  `driving_license` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `egn` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(13) NOT NULL,
  `document_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - drivingLicense\r\n2 - ID Number\r\n3 - Foreign Plate\r\n4 - Uridichesko\r\n',
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`egn`,`driving_license`,`eik`) USING BTREE,
  UNIQUE KEY `driving_license` (`driving_license`,`egn`) USING BTREE,
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_kat2`
--

CREATE TABLE `checks_kat2` (
  `driving_license` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `egn` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`driving_license`,`egn`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_kat_20240530`
--

CREATE TABLE `checks_kat_20240530` (
  `driving_license` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `egn` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - drivingLicense\r\n2 - ID Number\r\n3 - Foreign Plate\r\n',
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`driving_license`,`egn`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_kat_before_corporate`
--

CREATE TABLE `checks_kat_before_corporate` (
  `driving_license` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `egn` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1 - drivingLicense\r\n2 - ID Number\r\n3 - Foreign Plate\r\n',
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`driving_license`,`egn`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_kat_before_types`
--

CREATE TABLE `checks_kat_before_types` (
  `driving_license` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `egn` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`driving_license`,`egn`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_plate_all`
--

CREATE TABLE `checks_plate_all` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `origin` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'gtp',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_at` (`type`,`created_at`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4659354 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `insert_check_plate_all_emails` AFTER INSERT ON `checks_plate_all` FOR EACH ROW INSERT INTO all_emails (email,from_gtp) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_gtp = 1 */;;
DELIMITER ;

--
-- Table structure for table `checks_plate_identifier_all`
--

CREATE TABLE `checks_plate_identifier_all` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `origin` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `type` (`type`,`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=309417 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `checks_plate_to_all_emails` AFTER INSERT ON `checks_plate_identifier_all` FOR EACH ROW INSERT INTO all_emails (email,from_api) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_api = 1 */;;
DELIMITER ;

--
-- Table structure for table `checks_plate_identifier_unique`
--

CREATE TABLE `checks_plate_identifier_unique` (
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`identifier`,`email`,`type`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_plate_identifier_unique_20240813`
--

CREATE TABLE `checks_plate_identifier_unique_20240813` (
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`identifier`,`email`,`type`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_plate_identifier_unique_20250708`
--

CREATE TABLE `checks_plate_identifier_unique_20250708` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`identifier`,`email`,`type`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=111108 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_plate_identifier_unique_20250709`
--

CREATE TABLE `checks_plate_identifier_unique_20250709` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`identifier`,`email`,`type`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=111212 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_plate_unique`
--

CREATE TABLE `checks_plate_unique` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'what type of check caused the last update',
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=5247839 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_plate_unique2`
--

CREATE TABLE `checks_plate_unique2` (
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'what type of check caused the last update',
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_plate_unique_20250617`
--

CREATE TABLE `checks_plate_unique_20250617` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'what type of check caused the last update',
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=4509964 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_stats`
--

CREATE TABLE `checks_stats` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `uniq_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `page` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `started` int(11) NOT NULL,
  `finished` int(11) NOT NULL,
  `register_attempt` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_vignette_delicts`
--

CREATE TABLE `checks_vignette_delicts` (
  `license_plate` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  UNIQUE KEY `plate_identifier` (`license_plate`,`country_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_vignette_delicts_all`
--

CREATE TABLE `checks_vignette_delicts_all` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `created_at` (`created_at`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=58911 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `checks_vignette_delicts_to_all_emails` AFTER INSERT ON `checks_vignette_delicts_all` FOR EACH ROW INSERT INTO all_emails (email,from_api) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_api = 1 */;;
DELIMITER ;

--
-- Table structure for table `checks_vignette_delicts_unique`
--

CREATE TABLE `checks_vignette_delicts_unique` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL DEFAULT '0000-00-00',
  `vignette_event_date` date NOT NULL DEFAULT '0000-00-00',
  `next_check_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`country_code`,`email`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`),
  KEY `next_check_date` (`next_check_date`)
) ENGINE=InnoDB AUTO_INCREMENT=187143 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER enforce_next_check_date_before_insert
BEFORE INSERT ON checks_vignette_delicts_unique
FOR EACH ROW
BEGIN
  IF NEW.next_check_date < DATE_ADD(NEW.event_date, INTERVAL 10 DAY) THEN
    SET NEW.next_check_date = DATE_ADD(NEW.event_date, INTERVAL 10 DAY);
  END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER enforce_next_check_date_before_update
BEFORE UPDATE ON checks_vignette_delicts_unique
FOR EACH ROW
BEGIN
  IF NEW.next_check_date < DATE_ADD(NEW.event_date, INTERVAL 10 DAY) THEN
    SET NEW.next_check_date = DATE_ADD(NEW.event_date, INTERVAL 10 DAY);
  END IF;
END */;;
DELIMITER ;

--
-- Table structure for table `checks_vignette_delicts_unique_20250711`
--

CREATE TABLE `checks_vignette_delicts_unique_20250711` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL DEFAULT '0000-00-00',
  `vignette_event_date` date NOT NULL DEFAULT '0000-00-00',
  `next_check_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`country_code`,`email`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`),
  KEY `next_check_date` (`next_check_date`)
) ENGINE=InnoDB AUTO_INCREMENT=132619 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_vignette_delicts_unique_20250810`
--

CREATE TABLE `checks_vignette_delicts_unique_20250810` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL DEFAULT '0000-00-00',
  `vignette_event_date` date NOT NULL DEFAULT '0000-00-00',
  `next_check_date` date NOT NULL,
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`country_code`,`email`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`),
  KEY `next_check_date` (`next_check_date`)
) ENGINE=InnoDB AUTO_INCREMENT=152746 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_vignette_delicts_unique_test`
--

CREATE TABLE `checks_vignette_delicts_unique_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` tinyint(2) NOT NULL DEFAULT '1',
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `year` int(4) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `vignette_event_date` date NOT NULL DEFAULT '0000-00-00',
  `next_check_date` date NOT NULL DEFAULT '0000-00-00',
  `last_origin` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `block_reminder` tinyint(1) NOT NULL,
  `has_duplicate` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate_identifier_email_type` (`license_plate`,`country_code`,`email`),
  KEY `email` (`email`),
  KEY `event_date` (`event_date`),
  KEY `next_check_date` (`next_check_date`)
) ENGINE=InnoDB AUTO_INCREMENT=106287 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `checks_vinetka`
--

CREATE TABLE `checks_vinetka` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_vinetka_20250618`
--

CREATE TABLE `checks_vinetka_20250618` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_vinetka_globi`
--

CREATE TABLE `checks_vinetka_globi` (
  `license_plate` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  UNIQUE KEY `plate_identifier` (`license_plate`,`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_vinetka_new`
--

CREATE TABLE `checks_vinetka_new` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniq_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `plate` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `start_date` date NOT NULL,
  `event_date` date NOT NULL,
  `is_social` tinyint(4) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0 created\r\n1 send renewed',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`uniq_id`),
  KEY `event_date` (`event_date`),
  KEY `plate` (`plate`)
) ENGINE=InnoDB AUTO_INCREMENT=523794 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `uniqId` BEFORE INSERT ON `checks_vinetka_new` FOR EACH ROW IF NEW.uniq_id IS NULL OR NEW.uniq_id = '' THEN
    SET NEW.uniq_id = CONCAT_WS('_',
      NEW.plate,
      NEW.country_code,
      COALESCE(
        NULLIF(NEW.vignette_id, ''),
        CONCAT(DATE_FORMAT(NEW.start_date, '%Y%m%d'), '-', DATE_FORMAT(NEW.event_date, '%Y%m%d'))
      )
    );
  END IF */;;
DELIMITER ;

--
-- Table structure for table `checks_zastrahovka`
--

CREATE TABLE `checks_zastrahovka` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `checks_zastrahovka_20250130`
--

CREATE TABLE `checks_zastrahovka_20250130` (
  `id` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `data` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `cities_registration`
--

CREATE TABLE `cities_registration` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `latitude` varchar(50) NOT NULL,
  `longitude` varchar(50) NOT NULL,
  `from_sync` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=924 DEFAULT CHARSET=utf8;

--
-- Table structure for table `cities_registration_20241216`
--

CREATE TABLE `cities_registration_20241216` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `latitude` varchar(50) NOT NULL,
  `longitude` varchar(50) NOT NULL,
  `from_sync` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=902 DEFAULT CHARSET=utf8;

--
-- Table structure for table `contacts`
--

CREATE TABLE `contacts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `service_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `step` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` bigint(20) NOT NULL,
  `updated_at` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6065 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `contacts_autoparts`
--

CREATE TABLE `contacts_autoparts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `model_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `year_registration` int(11) NOT NULL,
  `engine` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vin` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `images` text COLLATE utf8_unicode_ci NOT NULL,
  `manual_entry` tinyint(4) NOT NULL,
  `json` text COLLATE utf8_unicode_ci NOT NULL,
  `gdrp` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=256 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `contacts_logs`
--

CREATE TABLE `contacts_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` text COLLATE utf8_unicode_ci NOT NULL,
  `email` text COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `headers` text COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4974 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `currency`
--

CREATE TABLE `currency` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `currency` double NOT NULL,
  `theTag` varchar(4) NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `debug_log_tyres`
--

CREATE TABLE `debug_log_tyres` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `s_get` text COLLATE utf8_unicode_ci NOT NULL,
  `s_post` text COLLATE utf8_unicode_ci NOT NULL,
  `s_server` text COLLATE utf8_unicode_ci NOT NULL,
  `s_files` text COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `guest_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=53586 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `email_simulation`
--

CREATE TABLE `email_simulation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `recipient` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `body` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `created_at` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `emails_brands`
--

CREATE TABLE `emails_brands` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` int(11) NOT NULL COMMENT 'only cars only needed once if used again we should create new table ',
  PRIMARY KEY (`id`),
  UNIQUE KEY `brand_id` (`brand_id`,`email`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=57381 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `events`
--

CREATE TABLE `events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `car_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `happens_on` date NOT NULL,
  `happens_on_km` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `happens_year` year(4) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `from_car` tinyint(2) NOT NULL,
  `system_event` tinyint(4) NOT NULL DEFAULT '0',
  `is_finished` tinyint(2) NOT NULL,
  `archived` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `car_id` (`car_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1346900 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `fixYear` BEFORE INSERT ON `events` FOR EACH ROW SET NEW.happens_year =  SUBSTRING( NEW.happens_on, 1, 4) */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `fixYearUpdate` BEFORE UPDATE ON `events` FOR EACH ROW SET NEW.happens_year =  SUBSTRING( NEW.happens_on, 1, 4) */;;
DELIMITER ;

--
-- Table structure for table `events_20250617`
--

CREATE TABLE `events_20250617` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `car_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `kind` tinyint(2) NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `happens_on` date NOT NULL,
  `happens_on_km` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `happens_year` year(4) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `from_car` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `archived` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `car_id` (`car_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1094201 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `events_files`
--

CREATE TABLE `events_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1453 DEFAULT CHARSET=utf8;

--
-- Table structure for table `events_kinds`
--

CREATE TABLE `events_kinds` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sortorder` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `facebook_pages`
--

CREATE TABLE `facebook_pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `page_url` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `news_tags` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `news_tags` (`news_tags`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `faq`
--

CREATE TABLE `faq` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `weight` int(11) NOT NULL,
  `is_active` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `favourites`
--

CREATE TABLE `favourites` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `object_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `files`
--

CREATE TABLE `files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `filters_in_categories`
--

CREATE TABLE `filters_in_categories` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(63) NOT NULL,
  `unit_of_measure_id` int(11) unsigned NOT NULL DEFAULT '0',
  `unit_of_measure_name` varchar(255) NOT NULL,
  `type` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `is_active` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `valid_for_all` tinyint(1) NOT NULL,
  `affects_price` tinyint(1) NOT NULL,
  `category_ids` varchar(500) NOT NULL,
  `allow_promotion` tinyint(2) NOT NULL,
  `show_in_product_info` tinyint(2) NOT NULL,
  `ordering` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `is_hidden` tinyint(1) NOT NULL,
  `shows_when` int(11) NOT NULL,
  `filter_list` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=83 DEFAULT CHARSET=utf8 COMMENT='таблица за филтри';

--
-- Table structure for table `filters_in_categories_values`
--

CREATE TABLE `filters_in_categories_values` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `filters_in_categories_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL COMMENT 'това не е връзка, а само инфо от кой продукт е въведено',
  `value` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ordering` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=441 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `filters_products`
--

CREATE TABLE `filters_products` (
  `product_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `filters_products_before_fire`
--

CREATE TABLE `filters_products_before_fire` (
  `product_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `filters_units`
--

CREATE TABLE `filters_units` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(31) NOT NULL,
  `is_active` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `filters_values`
--

CREATE TABLE `filters_values` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `product_id` int(11) unsigned NOT NULL DEFAULT '0',
  `filters_in_categories_id` int(11) unsigned NOT NULL DEFAULT '0',
  `value_id` int(11) NOT NULL,
  `value` varchar(63) NOT NULL,
  `range_from` double NOT NULL,
  `range_to` double NOT NULL,
  `is_multiple` tinyint(1) NOT NULL,
  `quant_id` int(11) NOT NULL,
  `sortorder` int(11) unsigned NOT NULL DEFAULT '0',
  `is_active` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `ordering` int(11) NOT NULL,
  `checking` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `product_id` (`product_id`,`range_from`,`range_to`),
  KEY `product_id_2` (`product_id`,`filters_in_categories_id`,`range_to`),
  KEY `product_id_3` (`product_id`,`filters_in_categories_id`,`range_from`)
) ENGINE=MyISAM AUTO_INCREMENT=2804 DEFAULT CHARSET=utf8;

--
-- Table structure for table `fines_logs`
--

CREATE TABLE `fines_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `page` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `module` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `agent` text COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4034655 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `fuel_files`
--

CREATE TABLE `fuel_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=923 DEFAULT CHARSET=utf8;

--
-- Table structure for table `fuel_history`
--

CREATE TABLE `fuel_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `car_id` int(11) NOT NULL,
  `name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `kind` tinyint(4) NOT NULL,
  `happend_on` date NOT NULL,
  `supplier_name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `price` float NOT NULL,
  `quantity` float NOT NULL,
  `full_tank` tinyint(4) NOT NULL,
  `mileage` int(11) NOT NULL DEFAULT '0',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_deleted` tinyint(2) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_ids` (`user_id`),
  KEY `car_id` (`car_id`)
) ENGINE=InnoDB AUTO_INCREMENT=14637 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `fuel_kinds`
--

CREATE TABLE `fuel_kinds` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sortorder` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_admin_access`
--

CREATE TABLE `gtp_admin_access` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_admin` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_userid_useremail` (`product_id`,`user_id`,`user_email`),
  KEY `emails` (`user_email`)
) ENGINE=InnoDB AUTO_INCREMENT=10601 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_alfam_data`
--

CREATE TABLE `gtp_alfam_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=29285 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_burgas_data`
--

CREATE TABLE `gtp_burgas_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=2142 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_clicks`
--

CREATE TABLE `gtp_clicks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `origin` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=92659 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_consult_vaq2_data`
--

CREATE TABLE `gtp_consult_vaq2_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=2879 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_consult_varna_data`
--

CREATE TABLE `gtp_consult_varna_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=22689 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_consult_vazov_data`
--

CREATE TABLE `gtp_consult_vazov_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`),
  KEY `event_date` (`event_date`)
) ENGINE=InnoDB AUTO_INCREMENT=13433 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_corporate_clients`
--

CREATE TABLE `gtp_corporate_clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `punkt_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(22) COLLATE utf8_unicode_ci NOT NULL,
  `mol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2145 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_corporate_clients_20240609`
--

CREATE TABLE `gtp_corporate_clients_20240609` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `punkt_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(22) COLLATE utf8_unicode_ci NOT NULL,
  `mol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_corporate_clients_20240628`
--

CREATE TABLE `gtp_corporate_clients_20240628` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `punkt_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(22) COLLATE utf8_unicode_ci NOT NULL,
  `mol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=870 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_corporate_clients_new`
--

CREATE TABLE `gtp_corporate_clients_new` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `punkt_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(22) COLLATE utf8_unicode_ci NOT NULL,
  `mol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=971 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_disloyal_clients`
--

CREATE TABLE `gtp_disloyal_clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=420 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_email_reminders_log`
--

CREATE TABLE `gtp_email_reminders_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `period_start` date NOT NULL,
  `period_end` date NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1689 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_email_reminders_log_20241003`
--

CREATE TABLE `gtp_email_reminders_log_20241003` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `period_start` date NOT NULL,
  `period_end` date NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=317 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_email_reminders_prep`
--

CREATE TABLE `gtp_email_reminders_prep` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `punkt_id` int(11) NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `period_start` date NOT NULL,
  `period_end` date NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_email_reminders_prep_20241003`
--

CREATE TABLE `gtp_email_reminders_prep_20241003` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `punkt_id` int(11) NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `period_start` date NOT NULL,
  `period_end` date NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_email_settings`
--

CREATE TABLE `gtp_email_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `static_text` text COLLATE utf8_unicode_ci NOT NULL,
  `buttons` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_email_settings_t`
--

CREATE TABLE `gtp_email_settings_t` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `static_text` text COLLATE utf8_unicode_ci NOT NULL,
  `buttons` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_guest_reservations`
--

CREATE TABLE `gtp_guest_reservations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ads` tinyint(4) NOT NULL,
  `terms` tinyint(4) NOT NULL,
  `gdpr` tinyint(4) NOT NULL,
  `registration` tinyint(4) NOT NULL,
  `booking_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3256 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_landing_contacts`
--

CREATE TABLE `gtp_landing_contacts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `punkt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_moneta`
--

CREATE TABLE `gtp_moneta` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reservation_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `status` tinyint(4) NOT NULL,
  `attempts` tinyint(11) NOT NULL,
  `sent` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `status` (`status`,`attempts`,`date`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1098 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_product_settings`
--

CREATE TABLE `gtp_product_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `lanes` tinyint(4) NOT NULL,
  `slot` int(11) NOT NULL,
  `prices` text COLLATE utf8_unicode_ci NOT NULL,
  `gas_available` tinyint(2) NOT NULL DEFAULT '1',
  `active_promo_codes` text COLLATE utf8_unicode_ci NOT NULL,
  `offset_reservation` int(11) NOT NULL,
  `offset_admin` int(11) NOT NULL,
  `weeks_ahead` tinyint(4) NOT NULL,
  `sms` tinyint(4) NOT NULL,
  `sms_report` tinyint(4) NOT NULL,
  `sms_report_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sms_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sms_days` int(11) NOT NULL,
  `sms_template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `viber_template` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `report_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `moneta_id` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `moneta_db` tinyint(4) NOT NULL,
  `moneta_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_moneta` tinyint(4) NOT NULL DEFAULT '0',
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_product_settings_20250916`
--

CREATE TABLE `gtp_product_settings_20250916` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `lanes` tinyint(4) NOT NULL,
  `slot` int(11) NOT NULL,
  `prices` text COLLATE utf8_unicode_ci NOT NULL,
  `gas_available` tinyint(2) NOT NULL DEFAULT '1',
  `active_promo_codes` text COLLATE utf8_unicode_ci NOT NULL,
  `offset_reservation` int(11) NOT NULL,
  `offset_admin` int(11) NOT NULL,
  `weeks_ahead` tinyint(4) NOT NULL,
  `sms` tinyint(4) NOT NULL,
  `sms_report` tinyint(4) NOT NULL,
  `sms_report_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sms_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sms_days` int(11) NOT NULL,
  `sms_template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `viber_template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `moneta_id` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `moneta_db` tinyint(4) NOT NULL,
  `moneta_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_moneta` tinyint(4) NOT NULL DEFAULT '0',
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_promo_codes`
--

CREATE TABLE `gtp_promo_codes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) DEFAULT NULL,
  `intended_user_id` int(11) DEFAULT NULL,
  `vehicle_kind` tinyint(4) DEFAULT NULL,
  `type` tinyint(4) NOT NULL COMMENT '1-multy-use, 2 single use',
  `redeem_limit` int(11) NOT NULL,
  `redeem_times` int(11) NOT NULL,
  `consumed` tinyint(4) NOT NULL,
  `expiration_date` date DEFAULT NULL,
  `is_active` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `after_update` BEFORE UPDATE ON `gtp_promo_codes` FOR EACH ROW BEGIN
    IF NEW.redeem_times >= NEW.redeem_limit THEN
        SET NEW.consumed = 1;
        SET NEW.is_active = 0;
    END IF;
END */;;
DELIMITER ;

--
-- Table structure for table `gtp_reservations`
--

CREATE TABLE `gtp_reservations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `is_disloyal` tinyint(4) NOT NULL,
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=413100 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_20250630`
--

CREATE TABLE `gtp_reservations_20250630` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=373344 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_20250709`
--

CREATE TABLE `gtp_reservations_20250709` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=376997 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_20250711`
--

CREATE TABLE `gtp_reservations_20250711` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=377914 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_20250714`
--

CREATE TABLE `gtp_reservations_20250714` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=380233 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_backup_clean`
--

CREATE TABLE `gtp_reservations_backup_clean` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=137491 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_cancelled`
--

CREATE TABLE `gtp_reservations_cancelled` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `og_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` float NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `is_disloyal` tinyint(4) NOT NULL DEFAULT '0',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `deleted_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=365 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_done`
--

CREATE TABLE `gtp_reservations_done` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` float NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `og_id` int(11) NOT NULL,
  `event_date` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `car_number` (`car_number`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=84047 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_done_2`
--

CREATE TABLE `gtp_reservations_done_2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `og_id` int(11) NOT NULL,
  `event_date` date NOT NULL,
  PRIMARY KEY (`id`),
  KEY `car_number` (`car_number`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=84047 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_moneta_test`
--

CREATE TABLE `gtp_reservations_moneta_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `is_disloyal` tinyint(4) NOT NULL,
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_truncate_new`
--

CREATE TABLE `gtp_reservations_truncate_new` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_reservations_truncated_new`
--

CREATE TABLE `gtp_reservations_truncated_new` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1-car,2-lpg',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `punkt` (`punkt_id`) USING BTREE,
  KEY `number_punkt` (`car_number`,`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sapoya`
--

CREATE TABLE `gtp_sapoya` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plate` varchar(15) NOT NULL,
  `phone` varchar(15) NOT NULL,
  `name` varchar(255) NOT NULL,
  `comment` varchar(255) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `brand_text` varchar(255) NOT NULL,
  `model_id` int(11) NOT NULL,
  `model_text` varchar(255) NOT NULL,
  `kind` int(11) NOT NULL,
  `insert_id` int(11) NOT NULL,
  `event_date` varchar(15) NOT NULL,
  `is_old` tinyint(4) NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `last_check` date NOT NULL,
  `raw_response` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `plate` (`plate`),
  KEY `event_date` (`event_date`,`last_check`,`attempts`)
) ENGINE=InnoDB AUTO_INCREMENT=19017 DEFAULT CHARSET=utf8mb4;

--
-- Table structure for table `gtp_sms_reminders`
--

CREATE TABLE `gtp_sms_reminders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `check_date` date NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`),
  KEY `punkt_id` (`punkt_id`),
  KEY `reservation_id` (`reservation_id`)
) ENGINE=InnoDB AUTO_INCREMENT=174168 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_20250709`
--

CREATE TABLE `gtp_sms_reminders_20250709` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `check_date` date NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`),
  KEY `punkt_id` (`punkt_id`),
  KEY `reservation_id` (`reservation_id`)
) ENGINE=InnoDB AUTO_INCREMENT=148964 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_20250711`
--

CREATE TABLE `gtp_sms_reminders_20250711` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `check_date` date NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`),
  KEY `punkt_id` (`punkt_id`),
  KEY `reservation_id` (`reservation_id`)
) ENGINE=InnoDB AUTO_INCREMENT=149654 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_20250729`
--

CREATE TABLE `gtp_sms_reminders_20250729` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `check_date` date NOT NULL,
  `event_date` date NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`),
  KEY `punkt_id` (`punkt_id`),
  KEY `reservation_id` (`reservation_id`)
) ENGINE=InnoDB AUTO_INCREMENT=155215 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_log`
--

CREATE TABLE `gtp_sms_reminders_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_message` text COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`,`insert_date`),
  KEY `insert_date` (`insert_date`),
  KEY `response_id` (`response_id`)
) ENGINE=InnoDB AUTO_INCREMENT=128041 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_log_20250308`
--

CREATE TABLE `gtp_sms_reminders_log_20250308` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`,`insert_date`),
  KEY `insert_date` (`insert_date`),
  KEY `response_id` (`response_id`)
) ENGINE=InnoDB AUTO_INCREMENT=60330 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_log_20250402`
--

CREATE TABLE `gtp_sms_reminders_log_20250402` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_message` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`,`insert_date`),
  KEY `insert_date` (`insert_date`),
  KEY `response_id` (`response_id`)
) ENGINE=InnoDB AUTO_INCREMENT=67017 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_prep`
--

CREATE TABLE `gtp_sms_reminders_prep` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_message` text COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=232 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_prep_20250317`
--

CREATE TABLE `gtp_sms_reminders_prep_20250317` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=153 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_prep_20250617`
--

CREATE TABLE `gtp_sms_reminders_prep_20250617` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_message` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=501 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_prep_20250903`
--

CREATE TABLE `gtp_sms_reminders_prep_20250903` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_message` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=247 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_prep_og`
--

CREATE TABLE `gtp_sms_reminders_prep_og` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_reminders_test`
--

CREATE TABLE `gtp_sms_reminders_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `viber_message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1-preped for sending, 4 sent, 5-failed send',
  `response_id` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `gtp_sms_sent_link`
--

CREATE TABLE `gtp_sms_sent_link` (
  `id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `sent_id` int(11) NOT NULL,
  `plate` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `punkt_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `plate` (`plate`),
  KEY `punkt_id` (`punkt_id`),
  KEY `sent_id` (`sent_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `guests`
--

CREATE TABLE `guests` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `guest_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `settings` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `guest_id` (`guest_id`)
) ENGINE=InnoDB AUTO_INCREMENT=39590692 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `hospital_type`
--

CREATE TABLE `hospital_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pin_color` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `hospitals`
--

CREATE TABLE `hospitals` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `hospital_type` tinyint(2) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` longtext NOT NULL,
  `username` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(1024) NOT NULL,
  `website` varchar(1024) NOT NULL,
  `address_map` varchar(1024) NOT NULL,
  `latitude` float(10,8) NOT NULL,
  `longitude` float(10,8) NOT NULL,
  `city` int(11) NOT NULL,
  `city_name` varchar(255) NOT NULL,
  `logo` text NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `search` longtext NOT NULL,
  `status` int(11) NOT NULL,
  `weight` double NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `inside_description` text NOT NULL,
  `is_checked` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `pin_color` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `insuarance_fields`
--

CREATE TABLE `insuarance_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `role` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `slug` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `help` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `fieldType` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `type_store` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `min_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `max_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `enum` longtext COLLATE utf8_unicode_ci NOT NULL,
  `used` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=194 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insuarance_fields_manual`
--

CREATE TABLE `insuarance_fields_manual` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `role` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `slug` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `help` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `fieldType` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `type_store` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `min_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `max_val` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `enum` longtext COLLATE utf8_unicode_ci NOT NULL,
  `used` tinyint(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=194 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_car_data`
--

CREATE TABLE `insurance_car_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `document_number` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `raw_response` text COLLATE utf8_unicode_ci NOT NULL,
  `has_data` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1012 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_car_data_dev`
--

CREATE TABLE `insurance_car_data_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `document_number` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `raw_response` text COLLATE utf8_unicode_ci NOT NULL,
  `has_data` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_emails_sent`
--

CREATE TABLE `insurance_emails_sent` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_emails_sent_dev`
--

CREATE TABLE `insurance_emails_sent_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_offers_data`
--

CREATE TABLE `insurance_offers_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1838 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_offers_data_dev`
--

CREATE TABLE `insurance_offers_data_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=353 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders`
--

CREATE TABLE `insurance_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `step_initial_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `selected_offer_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `selected_offer_installments` tinyint(4) NOT NULL,
  `insurance_offers_id` int(11) NOT NULL,
  `step_offers_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `date_services` text COLLATE utf8_unicode_ci NOT NULL,
  `step_personal_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `step_delivery_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `order_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `generated_documents` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1679 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders_dev`
--

CREATE TABLE `insurance_orders_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `step_initial_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `selected_offer_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `selected_offer_installments` tinyint(4) NOT NULL,
  `insurance_offers_id` int(11) NOT NULL,
  `step_offers_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `date_services` text COLLATE utf8_unicode_ci NOT NULL,
  `step_personal_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `step_delivery_submit` text COLLATE utf8_unicode_ci NOT NULL,
  `order_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_type` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `generated_documents` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=188 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders_offers`
--

CREATE TABLE `insurance_orders_offers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1838 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders_offers_dev`
--

CREATE TABLE `insurance_orders_offers_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=301 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders_orders`
--

CREATE TABLE `insurance_orders_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `insy_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `submit_response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`),
  KEY `insy_id` (`insy_id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders_orders_dev`
--

CREATE TABLE `insurance_orders_orders_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `insy_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `submit_response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `order_id` (`order_id`),
  KEY `insy_id` (`insy_id`)
) ENGINE=InnoDB AUTO_INCREMENT=66 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders_payments`
--

CREATE TABLE `insurance_orders_payments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `insy_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_ok` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_cancel` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `insy_id` (`insy_id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_orders_payments_dev`
--

CREATE TABLE `insurance_orders_payments_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `order_id` int(11) NOT NULL,
  `insy_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_ok` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_cancel` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `insy_id` (`insy_id`),
  KEY `order_id` (`order_id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_quick_contact`
--

CREATE TABLE `insurance_quick_contact` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `pictures` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_quick_contact_dev`
--

CREATE TABLE `insurance_quick_contact_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `pictures` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_tracking`
--

CREATE TABLE `insurance_tracking` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `ip` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ref_one` text COLLATE utf8_unicode_ci NOT NULL,
  `ref_two` text COLLATE utf8_unicode_ci NOT NULL,
  `http_referer` text COLLATE utf8_unicode_ci NOT NULL,
  `submitted_init` tinyint(4) NOT NULL,
  `seen_offers` tinyint(4) NOT NULL,
  `submitted_offer` tinyint(4) NOT NULL,
  `seen_personal` tinyint(4) NOT NULL,
  `submitted_personal` tinyint(4) NOT NULL,
  `checked_car` tinyint(4) NOT NULL,
  `seen_delivery` tinyint(4) NOT NULL,
  `submitted_delivery` tinyint(4) NOT NULL,
  `payment_type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `seen_completed` tinyint(25) NOT NULL,
  `current_step` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `order_status` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15538 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_tracking_banner`
--

CREATE TABLE `insurance_tracking_banner` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `count` int(11) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4172 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `insurance_webhooks`
--

CREATE TABLE `insurance_webhooks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insy_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `connector` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `state` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `insy_id` (`insy_id`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `ip_track_log`
--

CREATE TABLE `ip_track_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ip` varchar(255) NOT NULL,
  `address` varchar(2056) NOT NULL,
  `request` varchar(2056) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=669 DEFAULT CHARSET=utf8;

--
-- Table structure for table `listovki`
--

CREATE TABLE `listovki` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description` longtext COLLATE utf8_unicode_ci NOT NULL,
  `youtube` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `youtube_image` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_gtp_corporate_clients_deleted`
--

CREATE TABLE `logs_gtp_corporate_clients_deleted` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `og_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(22) COLLATE utf8_unicode_ci NOT NULL,
  `mol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `og_created_at` int(11) NOT NULL,
  `og_updated_at` int(11) NOT NULL,
  `deleted_by` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `punkt_id` (`punkt_id`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_gtp_reservations_deleted`
--

CREATE TABLE `logs_gtp_reservations_deleted` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `altered_by_id` int(11) NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL,
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1000) COLLATE utf8_unicode_ci NOT NULL,
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` float NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL,
  `is_disloyal` tinyint(4) NOT NULL DEFAULT '0',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `og_created_at` int(11) NOT NULL,
  `og_updated_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19430 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_gtp_reservations_edited`
--

CREATE TABLE `logs_gtp_reservations_edited` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `altered_by_id` int(11) NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `lane` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL,
  `event_date` date NOT NULL,
  `type` tinyint(4) NOT NULL DEFAULT '1',
  `variant` tinyint(4) NOT NULL,
  `suv` tinyint(4) NOT NULL,
  `agu` tinyint(4) NOT NULL,
  `euro` tinyint(4) NOT NULL,
  `comment` varchar(1000) COLLATE utf8_unicode_ci NOT NULL,
  `promo_code` text COLLATE utf8_unicode_ci NOT NULL,
  `paid` tinyint(4) NOT NULL,
  `payment_method` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `price` float NOT NULL,
  `vehicle_kind` tinyint(4) NOT NULL DEFAULT '1',
  `vehicle_category` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `car_model` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `car_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_phone` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `corporate_id` int(11) NOT NULL,
  `user_ip` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL,
  `is_disloyal` tinyint(4) NOT NULL DEFAULT '0',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `og_created_at` int(11) NOT NULL,
  `og_updated_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=115403 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_mails_sent`
--

CREATE TABLE `logs_mails_sent` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `recipient` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `recipient` (`recipient`)
) ENGINE=InnoDB AUTO_INCREMENT=11954402 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_sms_sent`
--

CREATE TABLE `logs_sms_sent` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `message_length` int(11) NOT NULL,
  `message_sms` int(11) NOT NULL,
  `viber_message` text COLLATE utf8_unicode_ci NOT NULL,
  `sim_card` tinyint(11) NOT NULL,
  `response_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `state` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `state_time` int(11) NOT NULL,
  `past_states` text COLLATE utf8_unicode_ci,
  `status_sms` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `status_viber` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `synced` int(11) NOT NULL,
  `date` date NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `callback` tinyint(4) NOT NULL,
  `license_plate` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `response_id` (`response_id`),
  KEY `date` (`date`),
  KEY `state` (`state`),
  KEY `punkt_id` (`punkt_id`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=94331 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_sms_sent_20250318`
--

CREATE TABLE `logs_sms_sent_20250318` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `message_length` int(11) NOT NULL,
  `message_sms` int(11) NOT NULL,
  `sim_card` tinyint(11) NOT NULL,
  `response_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `state` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `state_time` int(11) NOT NULL,
  `past_states` text COLLATE utf8_unicode_ci,
  `synced` int(11) NOT NULL,
  `date` date NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `callback` tinyint(4) NOT NULL,
  `license_plate` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `response_id` (`response_id`),
  KEY `date` (`date`),
  KEY `state` (`state`),
  KEY `punkt_id` (`punkt_id`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=45476 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_sms_sent_20250402`
--

CREATE TABLE `logs_sms_sent_20250402` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `message_length` int(11) NOT NULL,
  `message_sms` int(11) NOT NULL,
  `sim_card` tinyint(11) NOT NULL,
  `response_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `state` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `state_time` int(11) NOT NULL,
  `past_states` text COLLATE utf8_unicode_ci,
  `synced` int(11) NOT NULL,
  `date` date NOT NULL,
  `punkt_id` int(11) NOT NULL,
  `callback` tinyint(4) NOT NULL,
  `license_plate` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `response_id` (`response_id`),
  KEY `date` (`date`),
  KEY `state` (`state`),
  KEY `punkt_id` (`punkt_id`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=48417 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_tyre_search`
--

CREATE TABLE `logs_tyre_search` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `width` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `height` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `diameter` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `fuel` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `grip` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `noise` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `year` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `season_summer` tinyint(2) NOT NULL,
  `season_winter` tinyint(2) NOT NULL,
  `season_all` tinyint(2) NOT NULL,
  `type_car` tinyint(2) NOT NULL,
  `type_4x4` tinyint(2) NOT NULL,
  `type_van` tinyint(2) NOT NULL,
  `price_low` double NOT NULL,
  `price_high` double NOT NULL,
  `user_id` int(11) NOT NULL,
  `user_ip` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  `guest_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `user_agent` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=71220 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `logs_tyre_views`
--

CREATE TABLE `logs_tyre_views` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `user_ip` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8_unicode_ci NOT NULL,
  `user_car_brand` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `user_car_model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `user_car_year` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tyre_id` int(11) NOT NULL,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` double DEFAULT NULL,
  `profile` double DEFAULT NULL,
  `diameter` double DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `special_price` double NOT NULL,
  `free_delivery` tinyint(2) NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `warehouse` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=685118 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `mail_log`
--

CREATE TABLE `mail_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `segment_id` int(11) NOT NULL,
  `data` longtext NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `moneta_product_settings`
--

CREATE TABLE `moneta_product_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `moneta_id` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `moneta_db` tinyint(4) NOT NULL,
  `moneta_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `lanes` tinyint(4) NOT NULL,
  `slot` int(11) NOT NULL,
  `prices` text COLLATE utf8_unicode_ci NOT NULL,
  `gas_available` tinyint(2) NOT NULL DEFAULT '1',
  `active_promo_codes` text COLLATE utf8_unicode_ci NOT NULL,
  `offset_reservation` int(11) NOT NULL,
  `offset_admin` int(11) NOT NULL,
  `weeks_ahead` tinyint(4) NOT NULL,
  `sms` tinyint(4) NOT NULL,
  `sms_report` tinyint(4) NOT NULL,
  `sms_report_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sms_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sms_days` int(11) NOT NULL,
  `sms_template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `moneta_reservations`
--

CREATE TABLE `moneta_reservations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `shop` (`shop_id`) USING BTREE,
  KEY `license_plate_shop` (`license_plate`,`shop_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `moneta_reservations_canceled`
--

CREATE TABLE `moneta_reservations_canceled` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `deleted_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motoexpo`
--

CREATE TABLE `motoexpo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `ads` int(1) NOT NULL,
  `step1` text COLLATE utf8_unicode_ci NOT NULL,
  `step2` text COLLATE utf8_unicode_ci NOT NULL,
  `step3` text COLLATE utf8_unicode_ci NOT NULL,
  `barcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `barcode_manual` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `ticket_photo_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `double_up_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `shared` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1445 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motoexpo_2022`
--

CREATE TABLE `motoexpo_2022` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `ads` int(1) NOT NULL,
  `step1` text COLLATE utf8_unicode_ci NOT NULL,
  `step2` text COLLATE utf8_unicode_ci NOT NULL,
  `step3` text COLLATE utf8_unicode_ci NOT NULL,
  `barcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `barcode_manual` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=384 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motoexpo_2023`
--

CREATE TABLE `motoexpo_2023` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `ads` int(1) NOT NULL,
  `step1` text COLLATE utf8_unicode_ci NOT NULL,
  `step2` text COLLATE utf8_unicode_ci NOT NULL,
  `step3` text COLLATE utf8_unicode_ci NOT NULL,
  `barcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `barcode_manual` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `ticket_photo_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `double_up_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `shared` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1381 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motoexpo_bckp`
--

CREATE TABLE `motoexpo_bckp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `ads` int(1) NOT NULL,
  `step1` text COLLATE utf8_unicode_ci NOT NULL,
  `step2` text COLLATE utf8_unicode_ci NOT NULL,
  `step3` text COLLATE utf8_unicode_ci NOT NULL,
  `barcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `barcode_manual` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `ticket_photo_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `double_up_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `shared` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motoexpo_bckp2`
--

CREATE TABLE `motoexpo_bckp2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `ads` int(1) NOT NULL,
  `step1` text COLLATE utf8_unicode_ci NOT NULL,
  `step2` text COLLATE utf8_unicode_ci NOT NULL,
  `step3` text COLLATE utf8_unicode_ci NOT NULL,
  `barcode` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `barcode_manual` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(4) NOT NULL,
  `ticket_photo_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `double_up_code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `shared` tinyint(4) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motoexpo_teaser_entries`
--

CREATE TABLE `motoexpo_teaser_entries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `participant_id` int(11) NOT NULL,
  `participant_license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `doubled_up_by_participant_id` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1438 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motoexpo_teaser_participants`
--

CREATE TABLE `motoexpo_teaser_participants` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_type` tinyint(4) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `year_registration` int(4) NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `double_up_code` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `ads` int(1) NOT NULL,
  `terms` tinyint(2) NOT NULL,
  `gdrp` tinyint(2) NOT NULL,
  `all_trigger` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `wants_check` tinyint(2) NOT NULL,
  `shared` tinyint(4) NOT NULL,
  `ip` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `is_finished` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4459 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motorbike_models`
--

CREATE TABLE `motorbike_models` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `brand_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `years` text COLLATE utf8_unicode_ci NOT NULL,
  `alternate_names` text COLLATE utf8_unicode_ci NOT NULL,
  `old_id` int(11) NOT NULL,
  `alt_old_id` text COLLATE utf8_unicode_ci NOT NULL,
  `old_name` text COLLATE utf8_unicode_ci NOT NULL,
  `object` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13999 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `motorcycles`
--

CREATE TABLE `motorcycles` (
  `Brand` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Year` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Motorcycle_Type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Engine_Cooling` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Displacement` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Displacement_cm3` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Bore_X_Stroke` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Compression_Ratio` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Compression` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Horsepower` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `HP` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `HP_Max_Rpm` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Torque_Nm` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Torque_Rpm` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Fuel_System_Text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `CarburatedFuel_Injected` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Gearbox` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Transmission_Type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Clutch` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Primary_Drive` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Final_Drive` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Frame` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Front_Suspension` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Rear_Suspension` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Front_Brake` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Rear_Brake` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Overall_Length` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Overall_Width` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Seat_Height` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Weelbase` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Ground_Clearance` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Weight` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Fuel_Capacity` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Front` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Rear` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `Link` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `news`
--

CREATE TABLE `news` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `social_title` varchar(2056) NOT NULL,
  `social_url` varchar(255) NOT NULL,
  `meta_title` varchar(2056) NOT NULL,
  `meta_url` varchar(2056) NOT NULL,
  `meta_img` varchar(2056) NOT NULL,
  `category_ids` varchar(1024) NOT NULL,
  `old_category_ids` varchar(1024) DEFAULT NULL,
  `tag_ids` varchar(2056) NOT NULL,
  `on_data` date NOT NULL,
  `subtitle` varchar(255) NOT NULL,
  `description` longtext NOT NULL,
  `category_id` varchar(255) NOT NULL,
  `logo` text NOT NULL,
  `gallery` text NOT NULL,
  `youtube` varchar(2056) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `views` int(11) NOT NULL,
  `number_of_comments` int(11) NOT NULL,
  `last_comment_at` int(11) NOT NULL,
  `weight` int(11) NOT NULL,
  `is_promo` tinyint(2) NOT NULL,
  `publish_at` int(11) NOT NULL,
  `likes` tinyint(2) NOT NULL,
  `love` int(11) NOT NULL,
  `care` int(11) NOT NULL,
  `haha` int(11) NOT NULL,
  `wow` int(11) NOT NULL,
  `sad` int(11) NOT NULL,
  `angry` int(11) NOT NULL,
  `is_auto` tinyint(2) NOT NULL,
  `automation` tinyint(2) NOT NULL,
  `post_to_facebook` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `category_ids` (`category_ids`(333)),
  KEY `publish_at` (`publish_at`)
) ENGINE=MyISAM AUTO_INCREMENT=71670 DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_20240627`
--

CREATE TABLE `news_20240627` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `social_title` varchar(2056) NOT NULL,
  `social_url` varchar(255) NOT NULL,
  `meta_title` varchar(2056) NOT NULL,
  `meta_url` varchar(2056) NOT NULL,
  `meta_img` varchar(2056) NOT NULL,
  `category_ids` varchar(1024) NOT NULL,
  `old_category_ids` varchar(1024) DEFAULT NULL,
  `tag_ids` varchar(2056) NOT NULL,
  `on_data` date NOT NULL,
  `subtitle` varchar(255) NOT NULL,
  `description` longtext NOT NULL,
  `category_id` varchar(255) NOT NULL,
  `logo` text NOT NULL,
  `gallery` text NOT NULL,
  `youtube` varchar(2056) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `views` int(11) NOT NULL,
  `number_of_comments` int(11) NOT NULL,
  `last_comment_at` int(11) NOT NULL,
  `weight` int(11) NOT NULL,
  `is_promo` tinyint(2) NOT NULL,
  `publish_at` int(11) NOT NULL,
  `likes` tinyint(2) NOT NULL,
  `love` int(11) NOT NULL,
  `care` int(11) NOT NULL,
  `haha` int(11) NOT NULL,
  `wow` int(11) NOT NULL,
  `sad` int(11) NOT NULL,
  `angry` int(11) NOT NULL,
  `is_auto` tinyint(2) NOT NULL,
  `post_to_facebook` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `category_ids` (`category_ids`(333)),
  KEY `publish_at` (`publish_at`)
) ENGINE=MyISAM AUTO_INCREMENT=46548 DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_gallery_pictures`
--

CREATE TABLE `news_gallery_pictures` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=15000 DEFAULT CHARSET=utf8;

--
-- Table structure for table `news_modules`
--

CREATE TABLE `news_modules` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `show_in_news` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `news_tags`
--

CREATE TABLE `news_tags` (
  `news_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL,
  KEY `news` (`news_id`),
  KEY `tags` (`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `notificaitons_log`
--

CREATE TABLE `notificaitons_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` longtext NOT NULL,
  `user_id` int(11) NOT NULL,
  `location` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `notification`
--

CREATE TABLE `notification` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `from_object` int(11) NOT NULL,
  `to_user` int(11) NOT NULL,
  `to_object` int(11) NOT NULL,
  `url` varchar(1024) DEFAULT NULL,
  `title` varchar(1024) DEFAULT NULL,
  `description` text,
  `icon` char(20) DEFAULT NULL,
  `is_read` enum('0','1') DEFAULT '0',
  `sound_played` tinyint(2) NOT NULL,
  `the_type` varchar(9) NOT NULL,
  `sub_type` varchar(9) NOT NULL,
  `important` enum('0','1') NOT NULL,
  `approved` enum('0','1') NOT NULL,
  `object_id` int(11) NOT NULL,
  `code` varchar(15) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `notification_web_emails`
--

CREATE TABLE `notification_web_emails` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ulid` varchar(26) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `views` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ulid` (`ulid`),
  KEY `date` (`date`)
) ENGINE=InnoDB AUTO_INCREMENT=1396602 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `notifications_by_segment`
--

CREATE TABLE `notifications_by_segment` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `title_email` text NOT NULL,
  `description_email` text NOT NULL,
  `link_email` text NOT NULL,
  `email_template` int(11) NOT NULL,
  `send_from` varchar(255) NOT NULL,
  `url_to_open` text NOT NULL,
  `title_in_app` text NOT NULL,
  `description_in_app` text NOT NULL,
  `read_in_app_by` int(11) NOT NULL,
  `description_app_notification` text NOT NULL,
  `body_app_notification` text NOT NULL,
  `segment` int(11) NOT NULL,
  `query` text NOT NULL,
  `send_at` int(11) NOT NULL,
  `recurring` tinyint(2) NOT NULL,
  `has_send` tinyint(2) NOT NULL,
  `last_send` int(11) NOT NULL,
  `send_to_amount` int(11) NOT NULL,
  `sending_batch` text NOT NULL,
  `stats` varchar(255) NOT NULL,
  `stats_from` int(11) NOT NULL,
  `stats_tries` int(11) NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `approved` tinyint(2) NOT NULL,
  `voucher_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=444 DEFAULT CHARSET=utf8;

--
-- Table structure for table `notifications_by_segment_events`
--

CREATE TABLE `notifications_by_segment_events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `by_event` tinyint(2) NOT NULL,
  `name_of_event` varchar(255) NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `notifications_by_segment_log`
--

CREATE TABLE `notifications_by_segment_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `segment_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1066246 DEFAULT CHARSET=utf8;

--
-- Table structure for table `notifications_by_segment_log_temp`
--

CREATE TABLE `notifications_by_segment_log_temp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `segment_id` int(11) NOT NULL,
  `phone_id` varchar(100) NOT NULL,
  `email` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `segment_id` (`segment_id`,`phone_id`),
  KEY `gkb` (`segment_id`,`email`)
) ENGINE=InnoDB AUTO_INCREMENT=7097151 DEFAULT CHARSET=utf8;

--
-- Table structure for table `notifications_by_segment_stats`
--

CREATE TABLE `notifications_by_segment_stats` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `segment_id` int(11) NOT NULL,
  `notification` text NOT NULL,
  `stats` text NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7385 DEFAULT CHARSET=utf8;

--
-- Table structure for table `notifications_global_read`
--

CREATE TABLE `notifications_global_read` (
  `notification_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`notification_id`,`user_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `notifications_quick`
--

CREATE TABLE `notifications_quick` (
  `user_id` int(11) NOT NULL,
  `notification_id` int(11) NOT NULL,
  `is_read` tinyint(2) NOT NULL,
  PRIMARY KEY (`user_id`,`notification_id`),
  KEY `user_id` (`user_id`),
  KEY `user_id_2` (`user_id`,`is_read`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `on_this_day`
--

CREATE TABLE `on_this_day` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `text_bg` text COLLATE utf8_unicode_ci NOT NULL,
  `text_en` text COLLATE utf8_unicode_ci NOT NULL,
  `img_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `tag` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1775 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `partners`
--

CREATE TABLE `partners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `weight` int(11) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `partners_clients`
--

CREATE TABLE `partners_clients` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(22) COLLATE utf8_unicode_ci NOT NULL,
  `mol` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `contact` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `account_id` (`account_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `partners_owners`
--

CREATE TABLE `partners_owners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_phone` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=256 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `partners_vehicles`
--

CREATE TABLE `partners_vehicles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `kind` int(11) NOT NULL,
  `brand` int(11) NOT NULL,
  `model` int(11) NOT NULL,
  `year` int(11) NOT NULL,
  `owner_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`,`license_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=310 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `payment_types`
--

CREATE TABLE `payment_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `picture` text NOT NULL,
  `sortorder` int(11) NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `payments_checkouts`
--

CREATE TABLE `payments_checkouts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `checkout_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `checkout_id` (`checkout_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5997 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `payments_checkouts_20250502`
--

CREATE TABLE `payments_checkouts_20250502` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `checkout_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `checkout_id` (`checkout_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `payments_checkouts_dev`
--

CREATE TABLE `payments_checkouts_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `checkout_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `request` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `checkout_id` (`checkout_id`)
) ENGINE=InnoDB AUTO_INCREMENT=132 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `payments_webhook`
--

CREATE TABLE `payments_webhook` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `account_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `signature` text COLLATE utf8_unicode_ci NOT NULL,
  `verified` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16139 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `payments_webhook_dev`
--

CREATE TABLE `payments_webhook_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `account_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `signature` text COLLATE utf8_unicode_ci NOT NULL,
  `verified` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=301 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `personal_document_types`
--

CREATE TABLE `personal_document_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `weight` tinyint(4) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `personal_documents`
--

CREATE TABLE `personal_documents` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type_id` int(11) NOT NULL,
  `event_date` date NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`),
  KEY `user_ids` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9023 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `phone_log`
--

CREATE TABLE `phone_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `phone_id` varchar(55) NOT NULL,
  `is_mobile` tinyint(2) NOT NULL,
  `is_tablet` tinyint(2) NOT NULL,
  `is_phone` tinyint(2) NOT NULL,
  `os` tinyint(2) NOT NULL COMMENT '1 - ios, 2 - ipad, 3 - android, 4 - webos',
  `cookie_pure` varchar(55) NOT NULL,
  `device_id` varchar(255) NOT NULL,
  `kind` tinyint(2) NOT NULL COMMENT '1 - логин, 2 - регистрация, 3 - забравена парола',
  `came_from` tinyint(2) NOT NULL,
  `headers` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=173126 DEFAULT CHARSET=utf8;

--
-- Table structure for table `prep_for_egn_license`
--

CREATE TABLE `prep_for_egn_license` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `combined` (`egn`,`driving_license`,`eik`,`email`,`type`) USING BTREE,
  KEY `gkb` (`skip`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=85284 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_egn_license_log`
--

CREATE TABLE `prep_for_egn_license_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `eik` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `insert_date` (`insert_date`)
) ENGINE=InnoDB AUTO_INCREMENT=33809724 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_egn_license_test`
--

CREATE TABLE `prep_for_egn_license_test` (
  `egn` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `driving_license` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `document_type` tinyint(4) NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  UNIQUE KEY `combined` (`egn`,`driving_license`,`email`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate`
--

CREATE TABLE `prep_for_plate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=5489 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate_20250625`
--

CREATE TABLE `prep_for_plate_20250625` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=5402 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate_20250626`
--

CREATE TABLE `prep_for_plate_20250626` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=4559 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate_20250819`
--

CREATE TABLE `prep_for_plate_20250819` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=5933 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate_identifier`
--

CREATE TABLE `prep_for_plate_identifier` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `combined` (`license_plate`,`identifier`,`email`,`type`)
) ENGINE=InnoDB AUTO_INCREMENT=16997 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate_identifier_log`
--

CREATE TABLE `prep_for_plate_identifier_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `identifier` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4998911 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate_log`
--

CREATE TABLE `prep_for_plate_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `type` (`type`)
) ENGINE=InnoDB AUTO_INCREMENT=6449506 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_plate_test`
--

CREATE TABLE `prep_for_plate_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main` (`license_plate`,`email`,`type`),
  KEY `plate` (`license_plate`)
) ENGINE=InnoDB AUTO_INCREMENT=1571 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_vignette_delicts`
--

CREATE TABLE `prep_for_vignette_delicts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `combined` (`license_plate`,`country_code`,`email`)
) ENGINE=InnoDB AUTO_INCREMENT=8192 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_vignette_delicts_20250710`
--

CREATE TABLE `prep_for_vignette_delicts_20250710` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `combined` (`license_plate`,`country_code`,`email`)
) ENGINE=InnoDB AUTO_INCREMENT=10304 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_vignette_delicts_log`
--

CREATE TABLE `prep_for_vignette_delicts_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `license_plate` varchar(8) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `vehicle_kind` int(11) NOT NULL,
  `car_brand_id` int(11) NOT NULL,
  `car_model_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `insert_date` (`insert_date`)
) ENGINE=InnoDB AUTO_INCREMENT=829452 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_vignette_sales`
--

CREATE TABLE `prep_for_vignette_sales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `vignette_id` (`vignette_id`,`email`),
  KEY `status` (`status`,`skip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `prep_for_vignette_sales_log`
--

CREATE TABLE `prep_for_vignette_sales_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `insert_date` date NOT NULL,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `data_after` text COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `event_date_after` date DEFAULT NULL,
  `event_type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `event_type_after` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `attempts` tinyint(2) NOT NULL,
  `status` tinyint(1) NOT NULL,
  `skip` tinyint(4) NOT NULL DEFAULT '0',
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `insert_date` (`insert_date`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `product_certificate`
--

CREATE TABLE `product_certificate` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=61 DEFAULT CHARSET=utf8;

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `short_description` text NOT NULL,
  `description` longtext NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(1024) NOT NULL,
  `website` varchar(1024) NOT NULL,
  `youtube` varchar(1024) NOT NULL,
  `facebook` varchar(1024) NOT NULL,
  `twitter` varchar(1024) NOT NULL,
  `linkedin` varchar(1024) NOT NULL,
  `guarantee` text NOT NULL,
  `working_time` tinyint(2) NOT NULL,
  `working_hours` varchar(2056) NOT NULL,
  `address_map` varchar(1024) NOT NULL,
  `latitude` float(10,8) NOT NULL,
  `longitude` float(10,8) NOT NULL,
  `city` int(11) NOT NULL,
  `city_name` varchar(255) NOT NULL,
  `category_id` text NOT NULL,
  `category_names` varchar(512) NOT NULL,
  `tag_ids` varchar(1024) NOT NULL,
  `brand_ids` varchar(2056) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `logo` text NOT NULL,
  `background` varchar(1024) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `search` longtext NOT NULL,
  `status` int(11) NOT NULL,
  `views` int(11) NOT NULL,
  `weight` double NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `latitude` (`latitude`),
  KEY `latitude_2` (`latitude`)
) ENGINE=MyISAM AUTO_INCREMENT=14353 DEFAULT CHARSET=utf8;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `search` BEFORE UPDATE ON `products` FOR EACH ROW BEGIN
SET NEW.search = CONCAT('; ',CONCAT_WS(' ; ',NEW.title,NEW.description,NEW.city_name,NEW.address_map,NEW.category_names),' ;');
END */;;
DELIMITER ;

--
-- Table structure for table `products_20241216`
--

CREATE TABLE `products_20241216` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `short_description` text NOT NULL,
  `description` longtext NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(1024) NOT NULL,
  `website` varchar(1024) NOT NULL,
  `youtube` varchar(1024) NOT NULL,
  `facebook` varchar(1024) NOT NULL,
  `twitter` varchar(1024) NOT NULL,
  `linkedin` varchar(1024) NOT NULL,
  `guarantee` text NOT NULL,
  `working_time` tinyint(2) NOT NULL,
  `working_hours` varchar(2056) NOT NULL,
  `address_map` varchar(1024) NOT NULL,
  `latitude` float(10,8) NOT NULL,
  `longitude` float(10,8) NOT NULL,
  `city` int(11) NOT NULL,
  `city_name` varchar(255) NOT NULL,
  `category_id` text NOT NULL,
  `category_names` varchar(512) NOT NULL,
  `tag_ids` varchar(1024) NOT NULL,
  `brand_ids` varchar(2056) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `logo` text NOT NULL,
  `background` varchar(1024) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `search` longtext NOT NULL,
  `status` int(11) NOT NULL,
  `views` int(11) NOT NULL,
  `weight` double NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `latitude` (`latitude`),
  KEY `latitude_2` (`latitude`)
) ENGINE=MyISAM AUTO_INCREMENT=12773 DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_addons`
--

CREATE TABLE `products_addons` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `product_addon` int(11) NOT NULL,
  `has_descriptors` tinyint(1) NOT NULL,
  `descriptors` varchar(255) NOT NULL,
  `price` double NOT NULL,
  `quantity` int(11) DEFAULT '0',
  `status` tinyint(4) NOT NULL,
  `sortorder` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_before_fire`
--

CREATE TABLE `products_before_fire` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `short_description` text NOT NULL,
  `description` longtext NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(1024) NOT NULL,
  `website` varchar(1024) NOT NULL,
  `youtube` varchar(1024) NOT NULL,
  `facebook` varchar(1024) NOT NULL,
  `twitter` varchar(1024) NOT NULL,
  `linkedin` varchar(1024) NOT NULL,
  `guarantee` text NOT NULL,
  `working_time` tinyint(2) NOT NULL,
  `working_hours` varchar(2056) NOT NULL,
  `address_map` varchar(1024) NOT NULL,
  `latitude` float(10,8) NOT NULL,
  `longitude` float(10,8) NOT NULL,
  `city` int(11) NOT NULL,
  `city_name` varchar(255) NOT NULL,
  `category_id` text NOT NULL,
  `category_names` varchar(512) NOT NULL,
  `tag_ids` varchar(1024) NOT NULL,
  `brand_ids` varchar(2056) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `logo` text NOT NULL,
  `background` varchar(1024) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `search` longtext NOT NULL,
  `status` int(11) NOT NULL,
  `views` int(11) NOT NULL,
  `weight` double NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11223 DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_bkp_20230130`
--

CREATE TABLE `products_bkp_20230130` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `short_description` text NOT NULL,
  `description` longtext NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(1024) NOT NULL,
  `website` varchar(1024) NOT NULL,
  `youtube` varchar(1024) NOT NULL,
  `facebook` varchar(1024) NOT NULL,
  `twitter` varchar(1024) NOT NULL,
  `linkedin` varchar(1024) NOT NULL,
  `guarantee` text NOT NULL,
  `working_time` tinyint(2) NOT NULL,
  `working_hours` varchar(2056) NOT NULL,
  `address_map` varchar(1024) NOT NULL,
  `latitude` float(10,8) NOT NULL,
  `longitude` float(10,8) NOT NULL,
  `city` int(11) NOT NULL,
  `city_name` varchar(255) NOT NULL,
  `category_id` text NOT NULL,
  `category_names` varchar(512) NOT NULL,
  `tag_ids` varchar(1024) NOT NULL,
  `brand_ids` varchar(2056) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `logo` text NOT NULL,
  `background` varchar(1024) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `search` longtext NOT NULL,
  `status` int(11) NOT NULL,
  `views` int(11) NOT NULL,
  `weight` double NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11468 DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_bkp_20240104`
--

CREATE TABLE `products_bkp_20240104` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `short_description` text NOT NULL,
  `description` longtext NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(1024) NOT NULL,
  `website` varchar(1024) NOT NULL,
  `youtube` varchar(1024) NOT NULL,
  `facebook` varchar(1024) NOT NULL,
  `twitter` varchar(1024) NOT NULL,
  `linkedin` varchar(1024) NOT NULL,
  `guarantee` text NOT NULL,
  `working_time` tinyint(2) NOT NULL,
  `working_hours` varchar(2056) NOT NULL,
  `address_map` varchar(1024) NOT NULL,
  `latitude` float(10,8) NOT NULL,
  `longitude` float(10,8) NOT NULL,
  `city` int(11) NOT NULL,
  `city_name` varchar(255) NOT NULL,
  `category_id` text NOT NULL,
  `category_names` varchar(512) NOT NULL,
  `tag_ids` varchar(1024) NOT NULL,
  `brand_ids` varchar(2056) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `logo` text NOT NULL,
  `background` varchar(1024) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `search` longtext NOT NULL,
  `status` int(11) NOT NULL,
  `views` int(11) NOT NULL,
  `weight` double NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12513 DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_connections`
--

CREATE TABLE `products_connections` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `main_product_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `main_product_id_3` (`main_product_id`,`product_id`),
  KEY `main_product_id` (`main_product_id`,`product_id`),
  KEY `main_product_id_2` (`main_product_id`),
  KEY `product_id` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_details`
--

CREATE TABLE `products_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_gallery`
--

CREATE TABLE `products_gallery` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=446 DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_promotions`
--

CREATE TABLE `products_promotions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `date_from` date NOT NULL,
  `date_to` date NOT NULL,
  `logo` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `is_finished` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_quantity`
--

CREATE TABLE `products_quantity` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `has_descriptors` tinyint(1) NOT NULL,
  `descriptors` varchar(255) NOT NULL,
  `barcode` varchar(25) DEFAULT NULL,
  `price` double NOT NULL,
  `quantity` int(11) DEFAULT '0',
  `status` tinyint(4) NOT NULL,
  `track_quantity` tinyint(2) NOT NULL DEFAULT '0',
  `checked` tinyint(2) NOT NULL,
  `sortorder` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_rating`
--

CREATE TABLE `products_rating` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `is_in_order` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `comment` text,
  `email` varchar(255) NOT NULL,
  `rating` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `show_on_index` tinyint(1) NOT NULL,
  `gender` tinyint(1) NOT NULL,
  `is_recipe` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=854 DEFAULT CHARSET=utf8;

--
-- Table structure for table `products_status`
--

CREATE TABLE `products_status` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_unregistered`
--

CREATE TABLE `products_unregistered` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `service_id` int(11) NOT NULL,
  `inserted_from` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'service',
  `created_by` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18468 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_website`
--

CREATE TABLE `products_website` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `uniq_id` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `domain` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `favico` text COLLATE utf8_unicode_ci NOT NULL,
  `slug` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `style` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
  `price_style` varchar(191) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `meta_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `about_us` text COLLATE utf8_unicode_ci NOT NULL,
  `meta_description` varchar(160) COLLATE utf8_unicode_ci NOT NULL,
  `fb_link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `main_img` text COLLATE utf8_unicode_ci NOT NULL,
  `business_years` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `employee_count` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `checks_count` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`uniq_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_website_faq`
--

CREATE TABLE `products_website_faq` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `question` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `answer` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `weight` int(11) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `company_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_website_punkt`
--

CREATE TABLE `products_website_punkt` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `related_services_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `address` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `worktime` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `reservation_link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `destination_link` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `services_types` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `weight` int(11) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `is_main` tinyint(1) unsigned NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `company_id` (`product_id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `products_website_services`
--

CREATE TABLE `products_website_services` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `price` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `weight` int(11) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `company_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=225 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `promo_sms`
--

CREATE TABLE `promo_sms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `uniq_id` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=662 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `promotions`
--

CREATE TABLE `promotions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `url` text COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `weight` tinyint(2) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `questions`
--

CREATE TABLE `questions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `product_id` int(11) NOT NULL,
  `color` int(11) NOT NULL,
  `size` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` text NOT NULL,
  `email` text NOT NULL,
  `description` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

--
-- Table structure for table `queue`
--

CREATE TABLE `queue` (
  `id` bigint(25) NOT NULL AUTO_INCREMENT,
  `object` int(11) NOT NULL,
  `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `job` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `retries` tinyint(4) NOT NULL,
  `pause` tinyint(1) NOT NULL,
  `start_at` int(11) NOT NULL,
  `worker` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1351 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `queue_settings`
--

CREATE TABLE `queue_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `worker` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `action` enum('0','1','2') COLLATE utf8_unicode_ci NOT NULL COMMENT '0 - stop, 1 - active, 2 - restart',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `queue_test`
--

CREATE TABLE `queue_test` (
  `id` bigint(25) NOT NULL AUTO_INCREMENT,
  `object` int(11) NOT NULL,
  `type` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `job` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `retries` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `referral_visits`
--

CREATE TABLE `referral_visits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `page` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `ip` varchar(16) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29108 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `register_compare`
--

CREATE TABLE `register_compare` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `page` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `type` tinyint(4) NOT NULL,
  `attempted` tinyint(4) NOT NULL,
  `succeeded` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=385556 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `registration_headers`
--

CREATE TABLE `registration_headers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `internal` tinyint(4) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `post` text COLLATE utf8_unicode_ci NOT NULL,
  `server` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `reminder_account_settings`
--

CREATE TABLE `reminder_account_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `reminder_type_ids` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `enabled` tinyint(1) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `account_id` (`account_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `reminder_admin_access`
--

CREATE TABLE `reminder_admin_access` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `is_admin` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `account_id` (`account_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `reminder_tale`
--

CREATE TABLE `reminder_tale` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `event_at` date NOT NULL,
  `event_will_occur_on` date NOT NULL,
  `event_in_days` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `event_kind` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `event_table` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `object_id` int(11) NOT NULL,
  `event_type` tinyint(2) NOT NULL COMMENT '1 - за проверка, 2 - за изпращане, 3 - готово за изпращане, 4 - изпращане',
  `attempts` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1914044 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `reminder_templates`
--

CREATE TABLE `reminder_templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `type_id` int(11) NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_default` tinyint(4) NOT NULL,
  `installment_message` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `installment_message_last` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `installment_message_viber` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `installment_message_last_viber` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `reminder_types`
--

CREATE TABLE `reminder_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `installments` tinyint(4) NOT NULL,
  `max_installments` tinyint(4) NOT NULL,
  `default_installment` int(11) NOT NULL,
  `period` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `reminders`
--

CREATE TABLE `reminders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `type_id` int(11) NOT NULL,
  `template_id` int(11) NOT NULL,
  `vehicle_id` int(11) NOT NULL,
  `event_date` date NOT NULL,
  `send_date` date NOT NULL,
  `status` tinyint(4) NOT NULL,
  `is_last` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1068 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `reminders_20250317`
--

CREATE TABLE `reminders_20250317` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `type_id` int(11) NOT NULL,
  `template_id` int(11) NOT NULL,
  `vehicle_id` int(11) NOT NULL,
  `event_date` date NOT NULL,
  `send_date` date NOT NULL,
  `status` tinyint(4) NOT NULL,
  `is_last` tinyint(4) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=649 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `santa_chat`
--

CREATE TABLE `santa_chat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `uniq_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `chat` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `santa_mails`
--

CREATE TABLE `santa_mails` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniq_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniq_id` (`uniq_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `schedule_admin_access`
--

CREATE TABLE `schedule_admin_access` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `variant` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `is_admin` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_userid_useremail` (`product_id`,`user_id`,`user_email`,`variant`) USING BTREE,
  KEY `emails` (`user_email`)
) ENGINE=InnoDB AUTO_INCREMENT=152 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `search_log_shops`
--

CREATE TABLE `search_log_shops` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `s_get` text COLLATE utf8_unicode_ci NOT NULL,
  `s_post` text COLLATE utf8_unicode_ci NOT NULL,
  `s_server` text COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `guest_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2606749 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `search_log_tyres`
--

CREATE TABLE `search_log_tyres` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `s_get` text COLLATE utf8_unicode_ci NOT NULL,
  `s_post` text COLLATE utf8_unicode_ci NOT NULL,
  `s_server` text COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `guest_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=865278 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `service_history`
--

CREATE TABLE `service_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `car_id` int(11) NOT NULL,
  `name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `happend_on` date NOT NULL,
  `supplier_name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `price` float NOT NULL,
  `mileage` int(11) NOT NULL DEFAULT '0',
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_deleted` tinyint(2) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_ids` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=29995 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `service_history_denis`
--

CREATE TABLE `service_history_denis` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `car_id` int(11) NOT NULL,
  `name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `happend_on` date NOT NULL,
  `supplier_name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `price` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2620 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `service_history_gkb`
--

CREATE TABLE `service_history_gkb` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `car_id` int(11) NOT NULL,
  `name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `happend_on` date NOT NULL,
  `supplier_name` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `price` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `is_deleted` tinyint(2) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2916 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `service_pictures`
--

CREATE TABLE `service_pictures` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `object_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` varchar(1024) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `cuts` varchar(255) NOT NULL COMMENT 'видовете thumbs',
  `sortorder` int(11) NOT NULL,
  `is_main` tinyint(2) NOT NULL,
  `size` int(11) NOT NULL,
  `extension` varchar(15) NOT NULL,
  `original_name` varchar(255) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4009 DEFAULT CHARSET=utf8;

--
-- Table structure for table `service_tags_options`
--

CREATE TABLE `service_tags_options` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `parent_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=247 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `service_tags_relations`
--

CREATE TABLE `service_tags_relations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tag_id` int(11) NOT NULL,
  `service_id` int(11) NOT NULL,
  `parent_tag_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tags_ids` (`tag_id`),
  KEY `service_ids` (`service_id`)
) ENGINE=InnoDB AUTO_INCREMENT=60064 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `services_list`
--

CREATE TABLE `services_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
  `categoty_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `logo` text COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `is_main` tinyint(1) NOT NULL,
  `is_adr` tinyint(1) NOT NULL,
  `weight` int(11) unsigned NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `serviz_product_settings`
--

CREATE TABLE `serviz_product_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `lanes` tinyint(4) NOT NULL,
  `slot` int(11) NOT NULL,
  `prices` text COLLATE utf8_unicode_ci NOT NULL,
  `gas_available` tinyint(2) NOT NULL DEFAULT '1',
  `active_promo_codes` text COLLATE utf8_unicode_ci NOT NULL,
  `offset_reservation` int(11) NOT NULL,
  `offset_admin` int(11) NOT NULL,
  `weeks_ahead` tinyint(4) NOT NULL,
  `sms` tinyint(4) NOT NULL,
  `sms_report` tinyint(4) NOT NULL,
  `sms_report_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `sms_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `sms_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sms_days` int(11) NOT NULL,
  `sms_template` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `product_id` (`product_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `serviz_reservations`
--

CREATE TABLE `serviz_reservations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `date` (`date`),
  KEY `shop` (`shop_id`) USING BTREE,
  KEY `license_plate_shop` (`license_plate`,`shop_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `serviz_reservations_canceled`
--

CREATE TABLE `serviz_reservations_canceled` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  `deleted_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `serviz_reservations_deleted`
--

CREATE TABLE `serviz_reservations_deleted` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `altered_by_id` int(11) NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `og_created_at` int(11) NOT NULL,
  `og_updated_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `serviz_reservations_edited`
--

CREATE TABLE `serviz_reservations_edited` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `altered_by_id` int(11) NOT NULL,
  `reservation_id` int(11) NOT NULL,
  `account_id` int(11) NOT NULL,
  `shop_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `date` date NOT NULL,
  `start_time` time NOT NULL,
  `status` tinyint(4) NOT NULL COMMENT '1- запазено, 2 блокирано',
  `comment` varchar(1009) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `model` int(11) NOT NULL,
  `model_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` int(11) NOT NULL,
  `brand_txt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `user_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_by` tinyint(4) NOT NULL COMMENT '1- юзър, 2 админ панел',
  `referral` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `og_created_at` int(11) NOT NULL,
  `og_updated_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL DEFAULT '0',
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `shortener`
--

CREATE TABLE `shortener` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `short_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `track` tinyint(4) NOT NULL,
  `clicks` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `short_id` (`short_id`)
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `shortener_mm`
--

CREATE TABLE `shortener_mm` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniq_id` varchar(15) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `og_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `og_description` text COLLATE utf8_unicode_ci NOT NULL,
  `img_url` text COLLATE utf8_unicode_ci NOT NULL,
  `img_alt` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`uniq_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `shortener_track`
--

CREATE TABLE `shortener_track` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `short_link` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `uniq_id` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `short` (`short_link`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `sms_webhook_log`
--

CREATE TABLE `sms_webhook_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `event` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `response_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `channel` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `response_id` (`response_id`)
) ENGINE=InnoDB AUTO_INCREMENT=104646 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `sofia_owners`
--

CREATE TABLE `sofia_owners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=65630 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `static_pages`
--

CREATE TABLE `static_pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `description` longtext NOT NULL,
  `logo` text NOT NULL,
  `in_footer` tinyint(1) NOT NULL,
  `is_active` tinyint(1) NOT NULL,
  `location` varchar(255) NOT NULL,
  `link` varchar(512) NOT NULL,
  `weight` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

--
-- Table structure for table `survey_votes`
--

CREATE TABLE `survey_votes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `survey_id` int(11) NOT NULL,
  `voted_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `uniq_id` varchar(255) NOT NULL,
  `doubleup` varchar(50) NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `ip` varchar(255) NOT NULL,
  `shared` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=150 DEFAULT CHARSET=utf8;

--
-- Table structure for table `survey_votes_09062023`
--

CREATE TABLE `survey_votes_09062023` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `survey_id` int(11) NOT NULL,
  `voted_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `uniq_id` varchar(255) NOT NULL,
  `doubleup` varchar(50) NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `ip` varchar(255) NOT NULL,
  `shared` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `survey_votes_old`
--

CREATE TABLE `survey_votes_old` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `survey_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `doubleup` varchar(50) NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `ip` varchar(255) NOT NULL,
  `shared` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16303 DEFAULT CHARSET=utf8;

--
-- Table structure for table `surveys`
--

CREATE TABLE `surveys` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `news_id` int(11) NOT NULL,
  `question` text NOT NULL,
  `image` varchar(255) NOT NULL,
  `answer1` varchar(255) NOT NULL,
  `count1` int(11) NOT NULL,
  `answer2` varchar(255) NOT NULL,
  `count2` int(11) NOT NULL,
  `answer3` varchar(255) NOT NULL,
  `count3` int(11) NOT NULL,
  `answer4` varchar(255) NOT NULL,
  `count4` int(11) NOT NULL,
  `answer5` varchar(255) NOT NULL,
  `count5` int(11) NOT NULL,
  `answer6` varchar(255) NOT NULL,
  `count6` int(11) NOT NULL,
  `answer7` varchar(255) NOT NULL,
  `count7` int(11) NOT NULL,
  `answer8` varchar(255) NOT NULL,
  `count8` int(11) NOT NULL,
  `answer9` varchar(255) NOT NULL,
  `count9` int(11) NOT NULL,
  `answer10` varchar(255) NOT NULL,
  `count10` int(11) NOT NULL,
  `answer11` varchar(255) NOT NULL,
  `count11` int(11) NOT NULL,
  `answer12` varchar(255) NOT NULL,
  `count12` int(11) NOT NULL,
  `answer13` varchar(255) NOT NULL,
  `count13` int(11) NOT NULL,
  `answer14` varchar(255) NOT NULL,
  `count14` int(11) NOT NULL,
  `answer15` varchar(255) NOT NULL,
  `count15` int(11) NOT NULL,
  `answer16` varchar(255) NOT NULL,
  `count16` int(11) NOT NULL,
  `answer17` varchar(255) NOT NULL,
  `count17` int(11) NOT NULL,
  `answer18` varchar(255) NOT NULL,
  `count18` int(11) NOT NULL,
  `answer19` varchar(255) NOT NULL,
  `count19` int(11) NOT NULL,
  `answer20` varchar(255) NOT NULL,
  `count20` int(11) NOT NULL,
  `answer21` varchar(255) NOT NULL,
  `count21` int(11) NOT NULL,
  `answer22` varchar(255) NOT NULL,
  `count22` int(11) NOT NULL,
  `answer23` varchar(255) NOT NULL,
  `count23` int(11) NOT NULL,
  `answer24` varchar(255) NOT NULL,
  `count24` int(11) NOT NULL,
  `answer25` varchar(255) NOT NULL,
  `count25` int(11) NOT NULL,
  `answer26` varchar(255) NOT NULL,
  `count26` int(11) NOT NULL,
  `answer27` varchar(255) NOT NULL,
  `count27` int(11) NOT NULL,
  `answer28` varchar(255) NOT NULL,
  `count28` int(11) NOT NULL,
  `answer29` varchar(255) NOT NULL,
  `count29` int(11) NOT NULL,
  `answer30` varchar(255) NOT NULL,
  `count30` int(11) NOT NULL,
  `answer31` varchar(255) NOT NULL,
  `count31` int(11) NOT NULL,
  `answer32` varchar(255) NOT NULL,
  `count32` int(11) NOT NULL,
  `answer33` varchar(255) NOT NULL,
  `count33` int(11) NOT NULL,
  `answer34` varchar(255) NOT NULL,
  `count34` int(11) NOT NULL,
  `answer35` varchar(255) NOT NULL,
  `count35` int(11) NOT NULL,
  `answer36` varchar(255) NOT NULL,
  `count36` int(11) NOT NULL,
  `answer37` varchar(255) NOT NULL,
  `count37` int(11) NOT NULL,
  `answer38` varchar(255) NOT NULL,
  `count38` int(11) NOT NULL,
  `answer39` varchar(255) NOT NULL,
  `count39` int(11) NOT NULL,
  `answer40` varchar(255) NOT NULL,
  `count40` int(11) NOT NULL,
  `total` int(11) NOT NULL,
  `is_active` tinyint(4) NOT NULL,
  `published` tinyint(4) NOT NULL,
  `publish_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1071 DEFAULT CHARSET=utf8;

--
-- Table structure for table `surveys_future`
--

CREATE TABLE `surveys_future` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `news_id` int(11) NOT NULL,
  `survey_id` int(11) NOT NULL,
  `publish_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Table structure for table `sync`
--

CREATE TABLE `sync` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `file` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tags`
--

CREATE TABLE `tags` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `banner` varchar(1024) NOT NULL,
  `is_camping` tinyint(2) NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `title` (`title`)
) ENGINE=InnoDB AUTO_INCREMENT=3020 DEFAULT CHARSET=utf8;

--
-- Table structure for table `taxes_checks`
--

CREATE TABLE `taxes_checks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `power` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `year` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `eurostandart` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `response_text` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `emails` (`email`),
  KEY `created_at` (`created_at`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=353675 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `add_allmails` AFTER INSERT ON `taxes_checks` FOR EACH ROW INSERT INTO all_emails (email,from_tax) 
values(NEW.email,1) 
ON DUPLICATE KEY UPDATE from_tax = 1 */;;
DELIMITER ;

--
-- Table structure for table `tbi_params`
--

CREATE TABLE `tbi_params` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `seller_id` int(11) NOT NULL,
  `full_params` text COLLATE utf8_unicode_ci NOT NULL,
  `needed` text COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `testing`
--

CREATE TABLE `testing` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `asdasd` int(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `trips`
--

CREATE TABLE `trips` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `car_id` int(11) NOT NULL,
  `starting_point` text COLLATE utf8_unicode_ci NOT NULL,
  `middle_point` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ending_point` text COLLATE utf8_unicode_ci NOT NULL,
  `time_from` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `time_till` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `starting_at` datetime NOT NULL,
  `ending_at` datetime NOT NULL,
  `happend_on` date NOT NULL,
  `kilometers` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `kilometers_end` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `kilometers_total` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_valid` tinyint(2) NOT NULL,
  `is_finished` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5053 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres`
--

CREATE TABLE `tyres` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `noise_db` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` double DEFAULT NULL,
  `profile` double DEFAULT NULL,
  `diameter` double DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(2056) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `old_image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `special_price` double NOT NULL,
  `free_delivery` tinyint(2) NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `warehouse` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`),
  KEY `sku` (`sku`),
  KEY `code_diana` (`code_diana`),
  KEY `ean` (`ean`),
  KEY `price` (`price`)
) ENGINE=InnoDB AUTO_INCREMENT=316602 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres2`
--

CREATE TABLE `tyres2` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `noise_db` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` double DEFAULT NULL,
  `profile` double DEFAULT NULL,
  `diameter` double DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(2056) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `special_price` double NOT NULL,
  `free_delivery` tinyint(2) NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `warehouse` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`),
  KEY `sku` (`sku`),
  KEY `code_diana` (`code_diana`),
  KEY `ean` (`ean`)
) ENGINE=InnoDB AUTO_INCREMENT=20806 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_20230926_2`
--

CREATE TABLE `tyres_20230926_2` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `noise_db` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` double DEFAULT NULL,
  `profile` double DEFAULT NULL,
  `diameter` double DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(2056) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `special_price` double NOT NULL,
  `free_delivery` tinyint(2) NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `warehouse` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`),
  KEY `sku` (`sku`),
  KEY `code_diana` (`code_diana`),
  KEY `ean` (`ean`)
) ENGINE=InnoDB AUTO_INCREMENT=35654 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_bckp`
--

CREATE TABLE `tyres_bckp` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `profile` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `diameter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`),
  KEY `ean` (`ean`),
  KEY `code` (`code`),
  KEY `code_diana` (`code_diana`)
) ENGINE=InnoDB AUTO_INCREMENT=7284 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_bckp1`
--

CREATE TABLE `tyres_bckp1` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `profile` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `diameter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`)
) ENGINE=InnoDB AUTO_INCREMENT=7367 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_broken`
--

CREATE TABLE `tyres_broken` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `noise_db` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` double DEFAULT NULL,
  `profile` double DEFAULT NULL,
  `diameter` double DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(2056) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `special_price` double NOT NULL,
  `free_delivery` tinyint(2) NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `warehouse` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`),
  KEY `sku` (`sku`),
  KEY `code_diana` (`code_diana`),
  KEY `ean` (`ean`)
) ENGINE=InnoDB AUTO_INCREMENT=50995 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_calls`
--

CREATE TABLE `tyres_calls` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tyre_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=416 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_fail`
--

CREATE TABLE `tyres_fail` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` double DEFAULT NULL,
  `profile` double DEFAULT NULL,
  `diameter` double DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(2056) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `special_price` double NOT NULL,
  `free_delivery` tinyint(2) NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  `warehouse` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`),
  KEY `sku` (`sku`),
  KEY `code_diana` (`code_diana`),
  KEY `ean` (`ean`)
) ENGINE=InnoDB AUTO_INCREMENT=28107 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_new_pic`
--

CREATE TABLE `tyres_new_pic` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vendor` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `model` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pic` varchar(2054) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=232 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_orders`
--

CREATE TABLE `tyres_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `tos` text COLLATE utf8_unicode_ci NOT NULL,
  `post` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1418 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_pics`
--

CREATE TABLE `tyres_pics` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `img_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `img` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `img_url` (`img_url`)
) ENGINE=InnoDB AUTO_INCREMENT=1560 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_prices`
--

CREATE TABLE `tyres_prices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tyre_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `original_price` double NOT NULL,
  `price` double NOT NULL,
  `checked` tinyint(2) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tyre_id` (`tyre_id`,`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=988128 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_prices2`
--

CREATE TABLE `tyres_prices2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tyre_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `original_price` double NOT NULL,
  `price` double NOT NULL,
  `checked` tinyint(2) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tyre_id` (`tyre_id`,`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=26091 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_prices_fail`
--

CREATE TABLE `tyres_prices_fail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tyre_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `original_price` double NOT NULL,
  `price` double NOT NULL,
  `checked` tinyint(2) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tyre_id` (`tyre_id`,`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=35578 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_prices_test`
--

CREATE TABLE `tyres_prices_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tyre_id` int(11) NOT NULL,
  `seller_id` int(11) NOT NULL,
  `quantity` int(11) NOT NULL,
  `original_price` double NOT NULL,
  `price` double NOT NULL,
  `checked` tinyint(2) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tyre_id` (`tyre_id`,`seller_id`)
) ENGINE=InnoDB AUTO_INCREMENT=56448 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_rating`
--

CREATE TABLE `tyres_rating` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `is_in_order` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `comment` text,
  `email` varchar(255) NOT NULL,
  `rating` int(11) DEFAULT NULL,
  `status` tinyint(1) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `show_on_index` tinyint(1) NOT NULL,
  `gender` tinyint(1) NOT NULL,
  `is_recipe` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=53 DEFAULT CHARSET=utf8;

--
-- Table structure for table `tyres_russian`
--

CREATE TABLE `tyres_russian` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `profile` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `diameter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`)
) ENGINE=InnoDB AUTO_INCREMENT=107817 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_sellers`
--

CREATE TABLE `tyres_sellers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `logo` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_test`
--

CREATE TABLE `tyres_test` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `vendor_id` int(11) DEFAULT NULL,
  `model_id` int(11) DEFAULT NULL,
  `ean` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `sku` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `vendor_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_year` int(11) DEFAULT NULL,
  `season` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `car_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `moto_type` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `truck_axle` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_fuel` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_wet` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `eu_label_noise` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `production_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `oe_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `stud` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `green_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `width` double DEFAULT NULL,
  `profile` double DEFAULT NULL,
  `diameter` double DEFAULT NULL,
  `load_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `speed_index` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `rof_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `xl_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `c_flag` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vendor_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `model_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `photo_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gen_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_path` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `image_file` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `description_ru` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `description_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `checked` tinyint(2) NOT NULL,
  `price` double NOT NULL,
  `original_price` double NOT NULL,
  `special_price` double NOT NULL,
  `free_delivery` tinyint(2) NOT NULL,
  `pricing` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(150) COLLATE utf8_unicode_ci NOT NULL COMMENT 'код на примекс',
  `code_diana` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `quantity` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `rating` float NOT NULL,
  `rating_count` int(11) NOT NULL,
  `active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `width` (`width`),
  KEY `profile` (`profile`),
  KEY `diameter` (`diameter`),
  KEY `sku` (`sku`),
  KEY `code_diana` (`code_diana`)
) ENGINE=InnoDB AUTO_INCREMENT=29207 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `tyres_views`
--

CREATE TABLE `tyres_views` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tyre_id` int(11) NOT NULL,
  `views` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `user_messages`
--

CREATE TABLE `user_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL,
  `from_user_id` int(11) NOT NULL,
  `from_user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `to_user_id` int(11) NOT NULL,
  `message` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `is_read` tinyint(2) NOT NULL,
  `for_admin` tinyint(2) NOT NULL,
  `from_admin` tinyint(2) NOT NULL,
  `to_all` tinyint(2) NOT NULL,
  `group_id` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `group_id` (`group_id`)
) ENGINE=MyISAM AUTO_INCREMENT=18179 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `user_orders`
--

CREATE TABLE `user_orders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `user_phone` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `item_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `item_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `item_id` int(11) NOT NULL,
  `catalogue_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `supplier_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `price_per_unit` float NOT NULL,
  `quantity` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10326 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`myve`@`localhost`*/ /*!50003 TRIGGER `insert_users` AFTER INSERT ON `users` FOR EACH ROW INSERT INTO all_emails (email,from_users,ads) 
values(NEW.email,1,NEW.ads) 
ON DUPLICATE KEY UPDATE from_users = 1, ads = NEW.ads */;;
DELIMITER ;

--
-- Table structure for table `users_phones`
--

CREATE TABLE `users_phones` (
  `id` bigint(21) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `phone_id` varchar(1024) COLLATE utf8_unicode_ci NOT NULL,
  `device_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `phone_id` (`phone_id`(255))
) ENGINE=InnoDB AUTO_INCREMENT=80898 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `users_phones_subscriptions`
--

CREATE TABLE `users_phones_subscriptions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `phone_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `device_id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `object_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `users_roles`
--

CREATE TABLE `users_roles` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `level` int(6) DEFAULT NULL,
  `discount` double DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `utm_record`
--

CREATE TABLE `utm_record` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `utms` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vehicle_types`
--

CREATE TABLE `vehicle_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `icon_class` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `garage_icon` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `updated_at` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `viber_incomming`
--

CREATE TABLE `viber_incomming` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `correlated_message_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `phone_number` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `message` text COLLATE utf8_unicode_ci NOT NULL,
  `time` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=360 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_correspondence`
--

CREATE TABLE `vignette_correspondence` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `attachment` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=3715 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_correspondence_20250805`
--

CREATE TABLE `vignette_correspondence_20250805` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `attachment` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=1945 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_correspondence_20250814`
--

CREATE TABLE `vignette_correspondence_20250814` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `attachment` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=2229 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_correspondence_dev`
--

CREATE TABLE `vignette_correspondence_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `attachment` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_countries`
--

CREATE TABLE `vignette_countries` (
  `id` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_checks`
--

CREATE TABLE `vignette_delicts_checks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniq_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `origin` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`uniq_id`)
) ENGINE=InnoDB AUTO_INCREMENT=654198 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_checks_dev`
--

CREATE TABLE `vignette_delicts_checks_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniq_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` text COLLATE utf8_unicode_ci NOT NULL,
  `response` text COLLATE utf8_unicode_ci NOT NULL,
  `origin` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_id` (`uniq_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_correspondence`
--

CREATE TABLE `vignette_delicts_correspondence` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `delict_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `delict_document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `attachment` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=356 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_correspondence_20250806`
--

CREATE TABLE `vignette_delicts_correspondence_20250806` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `delict_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `delict_document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `attachment` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=141 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_correspondence_dev`
--

CREATE TABLE `vignette_delicts_correspondence_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `delict_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `delict_document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `subject` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `body` text COLLATE utf8_unicode_ci NOT NULL,
  `attachment` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_purchases`
--

CREATE TABLE `vignette_delicts_purchases` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `check_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_details` text COLLATE utf8_unicode_ci NOT NULL,
  `check_status_response` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `checkout_id` (`checkout_id`),
  KEY `sale_id` (`sale_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=573 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_purchases_dev`
--

CREATE TABLE `vignette_delicts_purchases_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `check_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_details` text COLLATE utf8_unicode_ci NOT NULL,
  `check_status_response` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `checkout_id` (`checkout_id`),
  KEY `sale_id` (`sale_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_sales`
--

CREATE TABLE `vignette_delicts_sales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `delict_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `delict_details` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `vignette_id` (`delict_id`)
) ENGINE=InnoDB AUTO_INCREMENT=356 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_sales_dev`
--

CREATE TABLE `vignette_delicts_sales_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `delict_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `delict_details` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `vignette_id` (`delict_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_delicts_tracking`
--

CREATE TABLE `vignette_delicts_tracking` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `ip` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ref_one` text COLLATE utf8_unicode_ci NOT NULL,
  `ref_two` text COLLATE utf8_unicode_ci NOT NULL,
  `check_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `delict_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `country_code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
  `http_referer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `submitted_details` tinyint(4) NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_generated` tinyint(4) NOT NULL,
  `seen_completed` tinyint(4) NOT NULL,
  `payment_paid` tinyint(4) NOT NULL,
  `delict_paid` tinyint(4) NOT NULL,
  `current_step` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1759 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_purchases`
--

CREATE TABLE `vignette_purchases` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `initial_details` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_activation_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `checkout_id` (`checkout_id`),
  KEY `sale_id` (`sale_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5351 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_purchases_dev`
--

CREATE TABLE `vignette_purchases_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `initial_details` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_activation_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `status` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `checkout_id` (`checkout_id`),
  KEY `sale_id` (`sale_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_reminder_dates`
--

CREATE TABLE `vignette_reminder_dates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_sales_id` int(11) NOT NULL,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`,`type`,`vignette_sales_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3695 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_reminder_dates_20250827`
--

CREATE TABLE `vignette_reminder_dates_20250827` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_sales_id` int(11) NOT NULL,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`,`type`,`vignette_sales_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2644 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_reminder_dates_dev`
--

CREATE TABLE `vignette_reminder_dates_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_sales_id` int(11) NOT NULL,
  `type` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `event_date` date NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `event_date` (`event_date`,`type`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_sales`
--

CREATE TABLE `vignette_sales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `country_code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `initial_details` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_activation_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `vignette_id` (`vignette_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3695 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_sales_20250825`
--

CREATE TABLE `vignette_sales_20250825` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `country_code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `initial_details` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_activation_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `vignette_id` (`vignette_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2578 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_sales_dev`
--

CREATE TABLE `vignette_sales_dev` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vignette_id` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `document_number` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `country_code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `license_plate` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `initial_details` text COLLATE utf8_unicode_ci NOT NULL,
  `personal_details` text COLLATE utf8_unicode_ci NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_request` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_response` text COLLATE utf8_unicode_ci NOT NULL,
  `digitoll_activation_response` text COLLATE utf8_unicode_ci NOT NULL,
  `checkout_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_request` text COLLATE utf8_unicode_ci NOT NULL,
  `payment_response` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `email` (`email`),
  KEY `vignette_id` (`vignette_id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_tracking`
--

CREATE TABLE `vignette_tracking` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `ip` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ref_one` text COLLATE utf8_unicode_ci NOT NULL,
  `ref_two` text COLLATE utf8_unicode_ci NOT NULL,
  `http_referer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `submitted_init` tinyint(4) NOT NULL,
  `seen_details` tinyint(4) NOT NULL,
  `submitted_details` tinyint(4) NOT NULL,
  `vignette_generated` tinyint(4) NOT NULL,
  `sale_id` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `payment_generated` tinyint(4) NOT NULL,
  `seen_completed` tinyint(4) NOT NULL,
  `payment_paid` tinyint(4) NOT NULL,
  `vignette_activated` tinyint(4) NOT NULL,
  `current_step` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`)
) ENGINE=InnoDB AUTO_INCREMENT=45082 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vignette_tracking_banner`
--

CREATE TABLE `vignette_tracking_banner` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `count` int(11) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4136 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vouchers`
--

CREATE TABLE `vouchers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `start_from` int(11) NOT NULL,
  `end_at` int(11) NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `for_currently_reg` tinyint(2) NOT NULL,
  `for_future_registrations` tinyint(2) NOT NULL,
  `testing` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vouchers_codes`
--

CREATE TABLE `vouchers_codes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `voucher_id` int(11) NOT NULL,
  `generate` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `code` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL,
  `guest_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `generated_for_user_id` int(11) NOT NULL,
  `from_campaign` tinyint(2) NOT NULL,
  `activated` tinyint(2) NOT NULL,
  `seen` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47307 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_batteries`
--

CREATE TABLE `vrt_batteries` (
  `id` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `base_hold_down` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `capacity` int(11) NOT NULL,
  `case_size` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `cca` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `length` int(11) NOT NULL,
  `width` int(11) NOT NULL,
  `layout` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `terminal_type` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `weight` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `etn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `article_number` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `ukcode` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `raw_data` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_brands`
--

CREATE TABLE `vrt_brands` (
  `id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_models`
--

CREATE TABLE `vrt_models` (
  `id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `brand_id` (`brand_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_specifications`
--

CREATE TABLE `vrt_specifications` (
  `id` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `year` int(11) NOT NULL,
  `battery_ids` text COLLATE utf8_unicode_ci NOT NULL,
  `b_width` int(11) NOT NULL,
  `b_height` int(11) NOT NULL,
  `b_length` int(11) NOT NULL,
  `base` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `terminal` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `layout` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `raw_data` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_specifications_batteries`
--

CREATE TABLE `vrt_specifications_batteries` (
  `specification_id` int(11) NOT NULL,
  `battery_id` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`specification_id`,`battery_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_year_brands`
--

CREATE TABLE `vrt_year_brands` (
  `year` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  UNIQUE KEY `year` (`year`,`brand_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_year_models`
--

CREATE TABLE `vrt_year_models` (
  `year` int(11) NOT NULL,
  `brand_id` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  PRIMARY KEY (`year`,`brand_id`,`model_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `vrt_year_specifications`
--

CREATE TABLE `vrt_year_specifications` (
  `year` int(11) NOT NULL,
  `model_id` int(11) NOT NULL,
  `specification_id` int(11) NOT NULL,
  PRIMARY KEY (`year`,`model_id`,`specification_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wall_comments`
--

CREATE TABLE `wall_comments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL,
  `object_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `reply_to` int(11) NOT NULL,
  `user_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `user_name_original` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `comment` text COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `parent_id` (`parent_id`,`object_id`)
) ENGINE=InnoDB AUTO_INCREMENT=134 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wall_links`
--

CREATE TABLE `wall_links` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `icon` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `url` varchar(2056) COLLATE utf8_unicode_ci NOT NULL,
  `buton_color` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `button_text_color` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `new_page` tinyint(2) NOT NULL,
  `weight` int(11) NOT NULL,
  `is_disabled` tinyint(2) NOT NULL,
  `group_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wall_links_types`
--

CREATE TABLE `wall_links_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wall_reactions`
--

CREATE TABLE `wall_reactions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `post_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `post_index` (`post_id`),
  KEY `user_index` (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=483 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wall_tracking`
--

CREATE TABLE `wall_tracking` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `web_opens` int(11) NOT NULL,
  `app_opens` int(11) NOT NULL,
  `total` int(11) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4005 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_brands`
--

CREATE TABLE `wpr_brands` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `year_start` int(11) unsigned NOT NULL,
  `year_end` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_models`
--

CREATE TABLE `wpr_models` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `brand_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `year_start` int(11) unsigned NOT NULL,
  `year_end` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2021 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_products`
--

CREATE TABLE `wpr_products` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `serie_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `short` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `length` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `special_case` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `class` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `arm_type_front` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `arm_type_rear` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `serie` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `qnt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `article` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `warranty` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `old_price` double(10,2) NOT NULL,
  `price` double(10,2) NOT NULL,
  `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=590 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_products_20250422`
--

CREATE TABLE `wpr_products_20250422` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `serie_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `short` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `length` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `special_case` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `class` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `arm_type_front` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `arm_type_rear` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `serie` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `qnt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `article` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `warranty` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `old_price` double(10,2) NOT NULL,
  `price` double(10,2) NOT NULL,
  `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=590 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_products_20250622`
--

CREATE TABLE `wpr_products_20250622` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `serie_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `short` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `length` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `special_case` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `class` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `arm_type_front` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `arm_type_rear` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `serie` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `position` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `qnt` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `article` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `warranty` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `old_price` double(10,2) NOT NULL,
  `price` double(10,2) NOT NULL,
  `image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=590 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_products_to_type`
--

CREATE TABLE `wpr_products_to_type` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pn` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `brand_id` int(11) unsigned NOT NULL,
  `model_id` int(11) unsigned NOT NULL,
  `type_id` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18021 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_series`
--

CREATE TABLE `wpr_series` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_special_cases`
--

CREATE TABLE `wpr_special_cases` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `sp_case` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  `name_en` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `wpr_types`
--

CREATE TABLE `wpr_types` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `brand_id` int(11) unsigned NOT NULL,
  `model_id` int(11) unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `class` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `year_start` int(11) unsigned NOT NULL,
  `year_end` int(11) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1923 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `zastrahovki_redirect`
--

CREATE TABLE `zastrahovki_redirect` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `uniq_id` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `ip` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9184 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `zrm_emails`
--

CREATE TABLE `zrm_emails` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `message_plain` longtext NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `connect_with` varchar(255) NOT NULL,
  `send_bcc` tinyint(2) NOT NULL,
  `for_admin` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_emails2`
--

CREATE TABLE `zrm_emails2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `message_plain` longtext NOT NULL,
  `is_active` tinyint(2) NOT NULL,
  `connect_with` varchar(255) NOT NULL,
  `send_bcc` tinyint(2) NOT NULL,
  `for_admin` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_emails_notations`
--

CREATE TABLE `zrm_emails_notations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `zrm_emails_id` int(11) NOT NULL,
  `notation` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `zrm_menu`
--

CREATE TABLE `zrm_menu` (
  `menu_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT '0',
  `module` varchar(50) DEFAULT NULL,
  `url` varchar(100) DEFAULT NULL,
  `menu_name` varchar(100) DEFAULT NULL,
  `menu_type` char(10) DEFAULT NULL,
  `role_id` varchar(100) DEFAULT NULL,
  `deep` smallint(2) DEFAULT NULL,
  `ordering` int(6) DEFAULT NULL,
  `position` enum('top','sidebar','both') DEFAULT NULL,
  `menu_icons` varchar(30) DEFAULT NULL,
  `active` enum('0','1') DEFAULT '1',
  `access_data` text,
  `allow_guest` enum('0','1') DEFAULT '0',
  `menu_lang` text,
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_menu_12112024`
--

CREATE TABLE `zrm_menu_12112024` (
  `menu_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT '0',
  `module` varchar(50) DEFAULT NULL,
  `url` varchar(100) DEFAULT NULL,
  `menu_name` varchar(100) DEFAULT NULL,
  `menu_type` char(10) DEFAULT NULL,
  `role_id` varchar(100) DEFAULT NULL,
  `deep` smallint(2) DEFAULT NULL,
  `ordering` int(6) DEFAULT NULL,
  `position` enum('top','sidebar','both') DEFAULT NULL,
  `menu_icons` varchar(30) DEFAULT NULL,
  `active` enum('0','1') DEFAULT '1',
  `access_data` text,
  `allow_guest` enum('0','1') DEFAULT '0',
  `menu_lang` text,
  PRIMARY KEY (`menu_id`)
) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_module`
--

CREATE TABLE `zrm_module` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module_sql` tinyint(1) NOT NULL,
  `title` varchar(100) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `controller` varchar(50) NOT NULL,
  `folder` varchar(20) NOT NULL,
  `tbl` varchar(255) DEFAULT NULL,
  `tbl_key` varchar(100) DEFAULT NULL,
  `module_type` varchar(15) DEFAULT 'master',
  `module_config` longtext,
  `module_multilang` tinyint(1) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `controller` (`controller`,`folder`)
) ENGINE=MyISAM AUTO_INCREMENT=120 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_notification`
--

CREATE TABLE `zrm_notification` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `from_object` int(11) NOT NULL,
  `to_user` int(11) NOT NULL,
  `to_object` int(11) NOT NULL,
  `url` varchar(1024) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `description` varchar(512) DEFAULT NULL,
  `icon` char(10) DEFAULT NULL,
  `is_read` enum('0','1') DEFAULT '0',
  `sound_played` tinyint(2) NOT NULL,
  `the_type` varchar(9) NOT NULL,
  `sub_type` varchar(9) NOT NULL,
  `important` enum('0','1') NOT NULL,
  `approved` enum('0','1') NOT NULL,
  `object_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `to_user` (`to_user`)
) ENGINE=MyISAM AUTO_INCREMENT=1970381 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_notification_old`
--

CREATE TABLE `zrm_notification_old` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `from_object` int(11) NOT NULL,
  `to_user` int(11) NOT NULL,
  `to_object` int(11) NOT NULL,
  `url` varchar(1024) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `description` varchar(512) DEFAULT NULL,
  `icon` char(10) DEFAULT NULL,
  `is_read` enum('0','1') DEFAULT '0',
  `sound_played` tinyint(2) NOT NULL,
  `the_type` varchar(9) NOT NULL,
  `sub_type` varchar(9) NOT NULL,
  `important` enum('0','1') NOT NULL,
  `approved` enum('0','1') NOT NULL,
  `object_id` int(11) NOT NULL,
  `created_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=401350 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_noty_messages`
--

CREATE TABLE `zrm_noty_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `description_text` longtext COLLATE utf8_unicode_ci NOT NULL,
  `the_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sub_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `icon` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `module` int(11) NOT NULL,
  `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `noty_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `noty_body` varchar(600) COLLATE utf8_unicode_ci NOT NULL,
  `app_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `app_body` varchar(2048) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=126 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `zrm_noty_messages_20241015`
--

CREATE TABLE `zrm_noty_messages_20241015` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `description_text` longtext COLLATE utf8_unicode_ci NOT NULL,
  `the_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sub_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `icon` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `module` int(11) NOT NULL,
  `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `noty_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `noty_body` varchar(600) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `zrm_noty_messages_before_noty`
--

CREATE TABLE `zrm_noty_messages_before_noty` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `description_text` longtext COLLATE utf8_unicode_ci NOT NULL,
  `the_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `sub_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `icon` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `module` int(11) NOT NULL,
  `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `zrm_settings`
--

CREATE TABLE `zrm_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `description` longtext NOT NULL,
  `type` tinyint(4) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_stats`
--

CREATE TABLE `zrm_stats` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `created_at` int(11) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Table structure for table `zrm_users_roles`
--

CREATE TABLE `zrm_users_roles` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL,
  `description` varchar(100) DEFAULT NULL,
  `level` int(6) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `zrm_users_roles_access`
--

CREATE TABLE `zrm_users_roles_access` (
  `id` int(6) NOT NULL AUTO_INCREMENT,
  `group_id` int(6) DEFAULT NULL,
  `module_id` int(6) DEFAULT NULL,
  `access_data` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=308 DEFAULT CHARSET=utf8;


