-- Host: db-master-7.internal    Database: ecommerce


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=9761;

--
-- Dumping data for table `orders`
--


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

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=47688;

--
-- Dumping data for table `products`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=26222;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$mk/FVnzt7itcw1mDa4mMrDqQZJkpn1XQFujqf1AhtfBZaEgBcqn6A','admin','ak_596954eb70cd96f0','2023-10-27 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$jfrmQiGCAuWUe4A7KkxADmTiF5.aEQXLLgKN6yUAcnFyQRzKyJ9uT','user','ak_b795c806aedda415','2023-08-04 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$OQQ0S7ygf7UhxOet/RVjkpn0IqB0Pts86iLsD/X7ug8cU20DKGYbV','user','ak_f1295b908e2982de','2023-08-24 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$NapldjaTkLdDjA1ps0loJnKyk4yHGi0vmhsOlRVWCh5CBPR4gJuqZ','admin','ak_d7bb47b6c9ca1861','2023-05-05 10:23:00',NULL);

