-- Host: db-master-0.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=42773;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$tRQKyMFQUSkptwOkk5rwBHyYaPYO.h8qTfuMSg4cV/o90TfmJGwq/','user','ak_341f9af517bf3d31','2023-02-19 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$BlsN7zBgwF7GXYhEV53mim7lJ4vnC2zsINuKhhQq6kQRcTbSm1EAi','user','ak_ae45d6eb93ea5ba6','2023-07-23 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$I1Ni51w418jLP1n13mNEE8eQsgHnWZAgeiIJHweYn.KJexeAOjCFQ','admin','ak_b4593eb78edbdf5e','2023-02-04 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$OYAHeYNNtixnrqZIxoOuj/b5l.xNvyzwRUudOcozcaUvIuLzSdFUA','user','ak_1d9217b09737ebd0','2023-12-02 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$e2UxHgIr92cF2g3SRr3vtPWcVJoKYl7XJH7byyKZHKMBtt2.tqxVg','user','ak_ddc1b69f561fa889','2023-01-15 10:07: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=43564;

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


