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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$qbXGhISlG8Y0iDfIHLtyT.BRaybhmxnZRk/AD9uFkGX73Pfmz/pDg','admin','ak_2149c0407330f7fe','2023-08-22 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$Wt1rsk8Ep5.oG6hu3.aGtJa3g9uKyG2.dy48AKbBHvH6zbdWi1fLM','admin','ak_2e031541bf0df956','2023-01-16 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$dmfs9GXlCdmNKnr2tIw/cWMwcCMGS7MPFvKuNjgomMqFyWl3ZT/zd','user','ak_d863af1ea52ebe40','2023-11-09 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$RFMMBu7Rvl/E1qTBPcJ3M.VY.lc7yjT4oaL6itxteEcry6D.avfnZ','user','ak_14891d07e7504b88','2023-06-27 10:10:00',NULL);

