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


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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$CTfO2zx6od50YIoH99eHAI5hcmrzaQEqt3x3FWwBat8f.UDd5KLIe','user','ak_ecefa262f8f771f1','2023-05-04 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$elDh0k8r6zS4E9U9OLoHnkUgZO5ju6MO8XH/NONpp.WxCopyQGS27','user','ak_03440fcf64833b44','2023-11-18 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$Bn4Y17c4z7UhVgUhSy7kqZGguKJ6s2Gy9ZIWGVcajXs6zGNWnBWTz','user','ak_23f5e431b22d95d2','2023-01-22 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$b5HvS6/uj0xIaYLASCmMBCN1dbLJaS2c2hHq2KQVRdS6ra9M7j8RL','user','ak_67789fada0ea27d3','2023-11-15 10:02:00',NULL);

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

--
-- Dumping data for table `orders`
--


