-- Host: db-master-3.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=2057;

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=6361;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$bgoOYK6/2.rYDlpYo1q6lK0ibkfHObOyzEEcn.4wWnc94Vk0jao73','user','ak_cb99ecdd37aa81f5','2023-04-03 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$a3T/i/qzYePZ20io4wmMkpzTcjAUYuQwS2RHK6D5or/9TYe69AqDJ','user','ak_2fd8bc5427e1995a','2023-06-08 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$WqvQZRdcjrEsb6G5bOiL1p7s0Wr1eggmwx8NJa6LI9bt.fZ24QkFM','user','ak_db08d30f48fbf164','2023-04-18 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$VTZF8B51bTTPnBafLczAx/Csc4xoFtmRT/RBMVbfNHcpH5rYNHSqA','admin','ak_3b32d1354e98edbe','2023-09-26 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$HKz6RyiAfAxmAG.UpGkNfOvbg0we3tRv3k1kxmZr24DwtHIAGOr/G','user','ak_1047983faf4d2675','2023-10-26 10:22:00',NULL);

