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


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

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$A3Mt.MBWJr2zMMQf71bUQpNhu5O9q0r31nqUb3R5TVDFta2dsXq0P','admin','ak_579b499b29863ac0','2023-04-06 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$km89n0/rigspjOukDFx5qD4FG9eKsycqW3d0CSHBsjDXew54veqnm','admin','ak_ad97f35861833234','2023-10-01 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$1XHyo.X6CzzUtFN4MtjZxkxNSyoyIVykLfZ8FSAsm5mcc2L9pzzOI','user','ak_45d1f32ae7b80e7a','2023-11-11 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$nUpQZKMSb0WYpw3o8iI4h2P85i8MRH3s1v/RszUb4/4fWAelIghQB','admin','ak_f23ed4b8c6410603','2023-06-03 10:04:00',NULL);

