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


--
-- 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=21697;

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


--
-- 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=20538;

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


--
-- 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=43425;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$suK29MN.EJuIC2IXVt9d8u4wShFPwU5QW2TpzWuSvf1WWkwJ972cS','admin','ak_abd7a7efba4311e3','2023-03-10 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$B6YiQF.1ZB7SEyh/msXk/DU4DH2QcQqAKVKcBGVBlpsRa2SkcpcKq','user','ak_a7285f58f68d017a','2023-01-06 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$rtAO.FCHudNnVpgn46RIuKbsBVVzq8Fm1WiJvpy5lKDpBhe1f.LKf','user','ak_d826fc3193351ffb','2023-06-09 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$vGSoAPGu1C0NB9qcig2Sofyscpi5KEaG1GaZmM401BsWYl59jn2qM','admin','ak_7f62b76b16b328d3','2023-02-09 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$uPC8f4ObfP45J65S.LhGAgOSWajgBAZRCWcqel.e4ZLktRf38fKIF','user','ak_262f4504728c95b3','2023-04-16 10:01:00',NULL);

