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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$xAOAHe0KytbBpueCgib20H7Y1DdrOE9eBgva1Hj4KOP7gZ0a8cvTr','admin','ak_a58314ee32941a3a','2023-07-24 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$sQ4tg/R0KkCuQ5BG3nGjZ3sdOQ4v8XBIkh1T/r3uuZT9Wf.3q.wVB','user','ak_d40dfb23a9c0f910','2023-10-17 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$ZoO4TaSUnt84ZOUX49M.oG9YHCvzYLX9LcrmPyoVFr.aZ.iSIrF9s','user','ak_3c2a384196703cb8','2023-07-21 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$Hlg/D4iGFCJo35vcPiFBpj2wP/AdOVBR/DpdBFDVJWcKZ8.BpceM8','user','ak_c558faa20569babe','2023-02-01 10:04: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=28939;

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


