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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$PlGD5Gt.lnlda4uKb71oLtuEtamYPsdtNOuV5EdkTOU7a8yQAjHaL','admin','ak_007c7671d047876a','2023-03-24 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Cia9E7lqV/GtF84CShQeIqvb4yR021DEG0SyDXBnKK2fpWxyAuA3r','user','ak_8e7b5bad38fc3015','2023-11-05 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$oJBsJXqlp3WkqhRIUh5Kv0uqFtDqJqSrfsGa4fO8UG6H8YTD1libE','user','ak_0228c809321d8cd5','2023-01-05 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$cBbhRdydGiRikjTvpV7C0qdR19Tg6H5sCbZQWB0PKv5C/4YJf4pnk','user','ak_c21740b96932369f','2023-03-15 10:17: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=38351;

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


