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

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$yd14MtWM5xvpeFnLjuxjbZIkSwZTkubWm39AS6M7UohvPMsOnuYaJ','user','ak_2926d656f72b747b','2023-04-10 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$rc9l1/.JisaWuTVhpvrCzE1sMNNI6z7.bw5HEmtEWF/PR/kgaLaq5','admin','ak_289dc7b4ce8079a3','2023-05-03 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$KxQOmB.IoLBuSIIGqjzi0tay.lVd1hbL9z2CNN6uDU4s/9Hq.NLud','user','ak_4aa98b53e60198ed','2023-09-06 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$2sBK0BAv54BHNDK0adZpat9wOU3Da82p9RQiFh.cSpvAJ0zrBBrhE','admin','ak_e748ab3496571640','2023-12-20 10:18:00',NULL);

