-- Host: db-master-5.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=27099;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$.ZkGrZAVPL7FJvgq5e0B8EzW5N0Y4aeCzSu8J.jG.sKV71RXnRA7c','admin','ak_e9565a6c767d273d','2023-01-10 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$0FHhNrg/OI16U/i3p00YeDd8nLpJrq7sjkcuPP3TjPhhijgMFPRDI','admin','ak_ef6213012bf07304','2023-01-24 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$i1hR.5qnyCqD2IBrng9VLQHRE13yx7uSgsI1UCHK1OL1OO9JRdyP/','user','ak_b8982547574e2ef1','2023-05-01 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$oU9d3Co5NCTCR4sfivDC/G0gsz2F0LfiOJmH26cxH4aDpGlcFtwj0','admin','ak_48c3cd51cbe4857c','2023-03-02 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$VZwVzMri1ng69b6KizQS6oOSWw/M5mwTCWdkdwUMudLIa.50BI38D','user','ak_609bf7cde740817a','2023-10-08 10:05:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$b1VvSobG.jx/kbgr/uvAKxN0pf0lqFBrpkftcOHVitUNirL01FoQN','user','ak_8549b438b4a4e133','2023-01-06 10:23: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=10386;

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


