-- Host: db-master-0.internal    Database: customers


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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$AgxlhfPqD97ecWAvB2Ce.5r1R6DS2nffsCdDs8LTv9W6j2Br/ChEY','user','ak_bb2e241e46b51e8d','2023-07-01 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$PaptfXQ3LvFSjVm.yZ8FO48XiNtmMPPbtwk93cgrxdwz5328RQmBU','user','ak_a390b5e69fe908c4','2023-07-06 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$0VrS8hownGj7IK07Zxp.4Joc2ort7OjXcyBZwIBMBbMqEpUwGxK4a','user','ak_8738be2959952991','2023-10-28 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$rbPsVnXNhjlGj5yVfpl4hyTSeFPSWnAxDcJh08hexrg/3OZ9MdsJA','user','ak_fafee1d27aa19232','2023-12-02 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$9jEQ9yiCBuTYQALH3xsvD02SEBXvxHtSzWyyTS478LPB.yR9MKgai','user','ak_cb4a020760f1889a','2023-05-26 10:06:00',NULL);

