-- Host: db-master-7.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=2717;

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$ft9YbPppo98lSVV0/PlVYPb7eQhRgXQRV7IRqne8t39ZUPJxAS9q2','user','ak_9304e12734e471e9','2023-11-08 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$SPS667c7KiauKEDMCIdhZP1wNiq70Y4K7HaZM1lxiSD2OIVj4vSbq','admin','ak_6c17b920cc809b94','2023-05-10 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$ccoWTyz5FEcWhzaY6j2qSiCPstYLN8ux6O/ca8fqIcrjAd32mnV3.','user','ak_173ea2a1cb3eda30','2023-11-24 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$EPJy.1OF2TXRuL4F2W4FTHpH7wL.9MzTmBBUS8YOHtuoynQ1eKoz.','user','ak_00a63204087ba230','2023-07-17 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$5dDKaqBCL0T18dxP5J8N4.hOxzA9c.bROw4zKD1HaTA.rMwT1z3mE','user','ak_a2385ca2e7c07d20','2023-11-25 10:03: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=34243;

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

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


