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


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$V7koeeJB1meeJipXrrJhC6fiMI34emq7Os4lQZEvALZl6VlA73..h','user','ak_6aec4cbecdd08535','2023-07-22 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$dIVeWHymJphIoVCglCnBZor2cxoVw3rRdDam9vWhQVv7ES4iQJILF','user','ak_fc4887bf9bfdda8e','2023-02-25 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$.vBv5u.uTsRhumkui.AVYn3uN.qBcKpihP1CHfSyxUYQ2Feuu0f/g','user','ak_6beec2eb8b477bd0','2023-05-04 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$vdIcSCAJQ4PImaI9CNFUjM/HvyUypH5fqJeFnJvG2D8Jzboay7tip','admin','ak_9f59a9167b0a64ae','2023-08-28 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$TQCrd/ex5mwU0l/6Mah.k2bC/d9GZKNyt8kttBQTe/1Kc2k7G9W6R','admin','ak_1d5b500a497b9c14','2023-09-10 10:18: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=47779;

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


