DROP TABLE IF EXISTS `codem_vehicleshops`;
DROP TABLE IF EXISTS `codem_vehicleshop_customer_vehicles`;
DROP TABLE IF EXISTS `codem_vehicleshop_employees`;
DROP TABLE IF EXISTS `codem_vehicleshop_ordered_vehicles`;
DROP TABLE IF EXISTS `codem_vehicleshop_purchase_log`;
DROP TABLE IF EXISTS `codem_vehicleshop_vault_log`;
DROP TABLE IF EXISTS `codem_vehicleshop_vehicles`;

CREATE TABLE IF NOT EXISTS `codem_vehicleshops` (
  `id` int(11) DEFAULT NULL,
  `name` longtext DEFAULT NULL,
  `vault` int(11) DEFAULT NULL,
  `wallpaper` longtext DEFAULT NULL,
  `categories` longtext DEFAULT NULL,
  `offline_employee_profit` int(11) DEFAULT NULL,
  `offline_employee_total_sold` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `codem_vehicleshop_customer_vehicles` (
  `id` int(11) DEFAULT NULL,
  `identifier` longtext DEFAULT NULL,
  `license` longtext DEFAULT NULL,
  `label` longtext DEFAULT NULL,
  `model` longtext DEFAULT NULL,
  `date` int(11) DEFAULT NULL,
  `customerName` longtext DEFAULT NULL,
  `vehiclePrice` int(11) DEFAULT NULL,
  `totalPaid` int(11) DEFAULT NULL,
  `manufacturer` longtext DEFAULT NULL,
  `color` longtext DEFAULT NULL,
  `customPlate` longtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `codem_vehicleshop_employees` (
  `id` int(11) DEFAULT NULL,
  `identifier` longtext DEFAULT NULL,
  `name` longtext DEFAULT NULL,
  `rank` longtext DEFAULT NULL,
  `totalEarned` int(11) DEFAULT NULL,
  `vehicleSold` int(11) DEFAULT NULL,
  `profit` int(11) DEFAULT NULL,
  `joinDate` int(11) DEFAULT NULL,
  `profile_picture` longtext DEFAULT NULL,
  `appliedRankUp` int(11) DEFAULT NULL,
  `commission` int(11) DEFAULT NULL,
  `permissions` longtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;


CREATE TABLE IF NOT EXISTS `codem_vehicleshop_ordered_vehicles` (
  `id` int(11) DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `deliveryTime` int(11) DEFAULT NULL,
  `model` longtext DEFAULT NULL,
  `label` longtext DEFAULT NULL,
  `manufacturer` longtext DEFAULT NULL,
  `image` longtext DEFAULT NULL,
  UNIQUE KEY `model` (`model`) USING HASH
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `codem_vehicleshop_purchase_log` (
  `id` int(11) DEFAULT NULL,
  `customer_name` longtext DEFAULT NULL,
  `vehicle_label` longtext DEFAULT NULL,
  `color` longtext DEFAULT NULL,
  `plate` longtext DEFAULT NULL,
  `seller_name` longtext DEFAULT NULL,
  `total_paid` longtext DEFAULT NULL,
  `date` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `codem_vehicleshop_vault_log` (
  `id` int(11) DEFAULT NULL,
  `name` longtext DEFAULT NULL,
  `rank` longtext DEFAULT NULL,
  `type` longtext DEFAULT NULL,
  `amount` longtext DEFAULT NULL,
  `date` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

CREATE TABLE IF NOT EXISTS `codem_vehicleshop_vehicles` (
  `id` int(11) DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `label` longtext DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `manufacturer` longtext DEFAULT NULL,
  `image` longtext DEFAULT NULL,
  `category` longtext DEFAULT NULL,
  `model` longtext DEFAULT NULL,
  `discount` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;