-- Host: db-master-8.internal    Database: webapp_db


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$eN8/IWI1gj7c8imsbuvO.r5QtN6z/XD8HOKiIfWbskBs8YeTwOR8U','user','ak_32e41e2093a09cef','2023-02-26 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$bBewe/So1XQ6NI6sygn46Y6jEBGcK3RPCisQegnxbrZyaG.Yxo1xO','user','ak_0ca894bc3746ff08','2023-10-24 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$eyf5TlsIgO.myACTjHKRBK0k0qt/PAf3VcffzrzXsO22lK0LuFpPD','admin','ak_e9781e83e13e79ee','2023-07-20 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$mYqTcbMb1GvbQV6pxqfvbZYfqiy1UeXGA1fMng2knVcDqlXWzL/O2','user','ak_b696b8a292769a8e','2023-06-21 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$IZmsvrFdNAJtpE3eD.CoXh1mEmQz6OZaWkgjTQWmEvT4xqc4NHXNm','user','ak_29dc92b8f85b4aa9','2023-01-22 10:01: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=47481;

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


