-- Host: db-master-3.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=18718;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$EmyXrrA5zr448oG0Dp8SVgrqZwaFvsiDAakPoY367jHaejcvhE.xA','user','ak_8bc7236abaa4d6f0','2023-09-04 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$x2OSGF8HoOsp8nWg1Wi8FTkZqlAdaytPZP4SQsuSWdLwdjbQxwoQw','admin','ak_ddb05db0a60f1d69','2023-04-02 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$N7SHzpFlBIs.gKquRQNto5VG090GrJGKMhYaxDY6vfPII1jKEKPuW','user','ak_f5b5be3798879f60','2023-02-25 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$QpMv7PulNcM3cdN15gwhBujXd3dagHOawjlhyq0EdS27HvTIuTRf9','admin','ak_7a6325ba111adc38','2023-12-08 10:23: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=35859;

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


