-- Host: db-master-6.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=32082;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$JlAWQ2cZXQSAO5SYuNq5z8g7NPzP7EDcQtk2RVL.QT7PWvwnETN4Y','admin','ak_6a97ed2164d9a04a','2023-09-19 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$b1QkpePIsCRJXMs7SdOr0TPhu/W9ndTc.3kHwexn2R8WkJXZPi2YT','user','ak_6cddb4a4f732a550','2023-08-09 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$eMuMtp8Kd9lE.UHoUPJML2eLGoildYL13opmtODg.6eFLIEU7rJzU','user','ak_cc6d4ae3826f5f27','2023-03-26 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$gprahnv/mWgQhYuZyS/svJDop6IBJ0sPN/EAlXT.xSrw.s69Tato/','user','ak_31adc6585110cf65','2023-05-22 10:09: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=25192;

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


