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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$UoxVDaJHHwXv/UR4nvYsZ8duFWG7h5IusILrqxWEUEIirQR9eFp3Y','user','ak_aaf0e82038f897a8','2023-07-13 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$VigNEtN32vFPLuKxgPZWNK11xtLih9DErqShC32zRzx5hZuH62tNd','admin','ak_190de25ba9cafd7e','2023-08-02 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$QeIk3FQoENfe9HRUEqvdc.Y6q.gzKLEjJ1Ljc.Cx/feCMl42vsfT6','admin','ak_54a7d6440ecdc3a5','2023-02-11 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$dDbH39vwvqa1sdR6/wfuaSenjP4TctXAK6syl4YTPXIJ5JTamBjtP','user','ak_1b10e025ad00ec35','2023-03-03 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$fNGxiM7JEX4m/yLA0c7GQTOC7eRNkv2O83NB0UWdqgyZKhiH2W3PT','user','ak_2d329c43fa88e1a1','2023-02-03 10:19: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=23760;

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


