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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$Ed0yl.LW3QibJUgNcznijJLsnPnCUhiggEo3pqrhhLe9wN5G.3kIW','admin','ak_23a86353d5683a0f','2023-11-14 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$u8XHYyIhX9yEj5ra2WxOothVF74B0LQCq9dMzsVU0dUiIkBIUoAiA','user','ak_04c4e2a04f6c4f05','2023-06-17 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$f6g.0NZ6xNFi0N.WtJ20l1DBS3AXAcMNOmA2XRLTZ/diFodN7whEr','user','ak_d932bd41e0ac14e2','2023-12-14 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$9tERC0TmZ5xBXoCyQlbkbIEjpJ8scoPRpe6ZXqumPRbV4z/p.vMg0','admin','ak_133b87de8ece80ae','2023-09-12 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$fCNmGQtUqEStJ8cf2E2TVJghjvR78LB6sOlufBl9ahinPiahYp6O1','admin','ak_4b2b62d2dc16e37d','2023-02-17 10:12: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=29487;

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


