-- Host: db-master-2.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=33729;

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$dJR6X67UrDBtnVxms8prUYMUgVDQ40H3fXetaSyysFuRBogxOPe2x','admin','ak_45f6e29b5bed47e5','2023-10-14 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$fsDBgOHuiv/a/GfPzk2Ns..RrQzEBSFqBbN77s2Hq2M8y6HxD78bl','admin','ak_571e063eec5d3f99','2023-02-09 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$dfUakUhPDfe6L8hSTDAS.fNeyLLe7gL57aZH13KOeClMVRjhhMj2x','user','ak_874dc9a3759dc2dc','2023-03-21 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$4KlRu5x3TQ.jfU7VEYodKvNMByIvxMse50JCd6jdGtaC0QYji94rZ','user','ak_6b4dbb9436267eaf','2023-08-22 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$kzGPZ.HuKzk0d.VDml3ZJ1inZaO6THPUBNrMI5L5hN/LH08rfrq2t','admin','ak_6aa201fd41eaab79','2023-02-09 10:19: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=43841;

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


