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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$n3t0G0PnBw8nWxjZrwPdfggJr9rXeskxhoe0bl8XjkBGrcgS1Lota','user','ak_dc7931a0a799d198','2023-09-09 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$xQnz4VNGDxrmEo0JhKDiaMsxaPivKfOVCgobPfhRwWoDvMktG5zrF','admin','ak_fe6bf502b7b4eee9','2023-09-24 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$cDfGGck2hG3tw2vFKy0Sy//nzFUN8opa8n7jc2pQLJqR3SxHwhEO5','user','ak_bed261d5de68629e','2023-08-03 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$DfvlXRW9T6VydEq8Ew7nOK0kLK5sjo0qKJwWhrFVLu6nuZ.AITIvi','admin','ak_cba31ba0c9d12058','2023-06-27 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$DKbABRwnpeJlHEXngFsz2AgQ6XnXUDosAF06R30bjkA2peKmmxoiJ','user','ak_8ac3c81169e83940','2023-05-11 10:17:00',NULL);

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

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

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


