-- Host: db-master-8.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=14641;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$Np2l6PC2.p9QQ66Ql8U016VnL1UgcTtgTKM/uBn/UkwOhcrklwFI7','user','ak_b02a1583e6800643','2023-03-12 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$ndbIZCfLi2nG4fxLxtuvnznf1LRZTbN5bhe3hSHofW7uyUkVH74SF','user','ak_39f9144b9ea517c3','2023-02-07 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$hSYhsiEo.ydSZXbSCaO.UV4K515l6tjB7dAIhMD3oDSkAVUDBi7Lk','user','ak_72dd84977e992566','2023-02-23 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$NQlwAxWvGct50ZoR6yfYqRUrt140GQC4iNz7BpBkfowS9utXSzNp4','admin','ak_dd6ff1f0a95f75cd','2023-01-16 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$8l/bALYXrDUui48NnMyzjF6wISbONTmLDv9kwZQdNs.T8VbZ8If2S','admin','ak_14338d35d61f643f','2023-11-13 10:19:00',NULL);

