-- Host: db-master-8.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=38740;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$wwvQnrtTIV7e5a0Z65DGmDC5y3VnJXGoglgjSuojqIGyTNa3BMRh2','admin','ak_58a50a21d7b45d81','2023-03-15 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$yG6nHWWKF4P.9kxedLAwkDIMUiNHYSxrohf.y1Vo74l1JtyueVjvG','admin','ak_9f04767d306d3af8','2023-06-09 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$lLxw4SBmjHPyfeY14I6Hob2K/F5dNdRG2YGsdYl2sFgJGAa22m4ti','admin','ak_fc4124748199dcef','2023-02-02 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$W/EaByvhr6n0x4StutD6JWE7HRoaJQHI0HAONXI1G6QtPncuWaJzV','user','ak_99c8ea27bca487cb','2023-05-10 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$.YX8wAAKtdXM3WbjU6v4BRFC7m6v7s5tIYp7k2ksvATEPrj5xFfj2','user','ak_4da89aafe24cbd63','2023-12-01 10:23: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=36333;

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


