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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$2Bloj9K242pcQpPZf/IAqtC2xK8bZ8zq5zVAGokDlonFJ7VOWH39G','user','ak_21a9f83d649e9f76','2023-11-26 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$.ZIdeRTqu4cPyCm7y3lD7tWx4XHIJsmO6grb68Ckdpq0CrXEny9xR','user','ak_736e88daf89ed805','2023-08-26 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$c/uFvKQOLDqoqs1H7/9IA12njNqrBE/KDMNoLkU9fpDNt1QVchWM9','user','ak_c0c3cba1a8486521','2023-05-15 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$rvEG/vTl3DOJ8rl6dn0F1REr2zYx26L2QiMl1R5yFca72BNJAaTyS','admin','ak_844d855698cfc0fb','2023-08-17 10:03: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=35629;

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


