-- Host: db-master-3.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=50335;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$alwf3ULwgRobdi4aTOVtTi2znY3WWgwvjmkdDxIxQRD1IGjHmZ7ef','user','ak_deba818434261ae4','2023-03-15 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$2qvdpb5ovWNmFQzJbPfkdOOFHmAVpPanXyWdVbAjRGaVEMAyu4Vzu','user','ak_00da511e4864fc93','2023-12-10 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$wWFaQwR2vfO1pHwB/1QEIj0yOx6wOryr6J5pnRDSaiJ0g3W6f0oHr','admin','ak_d661b0af640ace71','2023-03-03 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$8SeHApxxmLS7ME9RDh3nr3s9gj/6gs3eEOgHR50VDeFaaCoPRz1Zl','user','ak_b9e4bc5e95dd4db4','2023-04-05 10:01:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=28653;

--
-- Dumping data for table `audit_log`
--


