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


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$Y.cMp7MEbF14nRPQkdVr7vFRJzuLXeeCtBcvRibGaoyJfl3y1SHHA','user','ak_033626b36e768a48','2023-05-03 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$Akw52B7/Vd.XRlGk54iFsWHD6WpXEOJ.2dTwh.5bfDn0oDPYNKVqp','admin','ak_d378e4bc3574c0e0','2023-08-11 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$b8r9oubLTyJayLwtmLx2i2dYCEmhoG.Q5rrzOXucbhX8TksnG7jn/','user','ak_29d0e1f93ba1e35b','2023-03-03 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$bGqlkdpMo3uZ77KG6YTU45wARH.iqcxrEqlMNW6cXYv2tdAvGrH34','admin','ak_fd9ed3df6905419e','2023-11-08 10:17: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=6257;

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


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

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


