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

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$FSWS0WlYqgqXTfJE603Cek.ea7kNJbZIhSDEYDqSmHTmYyrSMBX9n','user','ak_3e1539b0f866207b','2023-04-15 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$0qcJqs33Q0RlKbDBsRb5cfUm9LKQuesUMp0.L1abHLvpBa6moj1hG','admin','ak_167281b110daa994','2023-08-09 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$0LAXelonOx8Eg9ZGbctQuLJObnXsbr/oMnLfqDehT5B/bFT10/Jpn','user','ak_1ce5217ef9bebb5a','2023-11-22 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$sTQa5h/PszmmIBqiKpEjnbOo71OHvfAh5WyUYdLvMuDj8cipjAv6s','admin','ak_b6595b43e0a2fd61','2023-03-27 10:01:00',NULL);

