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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$0EXPO3PUvuTv./hihfhlHMri1PHDiAQb1J/pvBzKxbgn23RByY/D8','user','ak_c9aefe98a3fbbe7e','2023-04-21 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$euno22/r.VnK2pcOVOjQzZq9qSlYh1TCVJU8yDlWQ.1qmu.KIL0/N','user','ak_b047189d2a863466','2023-06-12 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$fTecwjSvBVoMzcCJnzkV5W60dJE9TlQGe8P5YYQObIYEK0.64T3TU','user','ak_1556e643c20b0c1d','2023-03-21 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$L2citSy7/eHJhJEf7CCDH4NmklqLQBkoCPr/YrFrtD/WvBxwRkJIp','user','ak_118bbd777a99551e','2023-08-16 10:16:00',NULL);

