-- Host: db-master-6.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=14402;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$t.xioKHnQDX/NsAKAskA3u4Uy.bAtsJxBNmCptguWeiAnQGtNrr8U','admin','ak_ea62cf0e968064d2','2023-03-28 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$Zn/m9uidaHyLb8h2EVcs.vYNYt8XAQBzs7xwkYIwGtyl8lja5nhx2','user','ak_d14a2fe229d7ff64','2023-04-20 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$kWbPQJ9paP9Ro75hKGd7Fp4bojBtZ2MGQJiTsdR7LPVAU3fVuijA0','user','ak_843df3194b244865','2023-03-19 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$B2Y5o0JCIbbQydrloL.XWZvaOod6McBq9sZtIx8mUJI0I13iIwr32','user','ak_885627fdd0b63f03','2023-08-22 10:06: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=9699;

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


