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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$yQm/hlEiY30AzMHEyqOM2sWH06GVpmW7zzWMduJFTNTuRictSvS3S','user','ak_a55636729e2fcf53','2023-01-15 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$VFU8/RXcn2BbK33EgnuoM5cw5dpMY8B/PO3mHNq8XOZw.TKnN1l24','admin','ak_20a15f88a2e11859','2023-08-24 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$quFIk1vxMj.piaIQfFGaRDQyrvfDqmpEnb41zCfzetlM9bjaoKJJ4','user','ak_e4cc025bfdeb346d','2023-03-12 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$ymSdJmjSeXi/Iqsm1lx1zTSFUZLRGnhmiQ9mZQbBXK6bTsD/1S4ay','admin','ak_127d2f55c33392c3','2023-04-22 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$SDTmfxVQXc0hZYMNfHO/iLqX/oe4HBv5Th4ASVxAAZGrzzlqgB/mW','user','ak_ec6419f90720c84e','2023-04-08 10:22:00',NULL);

