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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$Gfw6cvXQ4L3L1l0uN3uWltXjfKho.yPVWdkGKNg4.Z95alUzPrlRr','admin','ak_e4c058dd2a8333fd','2023-01-13 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$VNRmmCQIT4E7bPdc9bZV5J.CLnuueBeXMbD5JWYnKlYOI7zdCap6I','user','ak_c12779a8dc7d01ef','2023-11-08 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$vcZgNT6hOjsAexb5qlyHBMz/TcHM3jYNbjrGpryl4/YkoRKV6OsMk','user','ak_92caf653925eb807','2023-05-15 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$Qz.ehQn5YmXEp11TW9EM7LneKz4hKqwn4ojiq2X4mjYB91MsW9iDH','user','ak_a5af73441fabaa92','2023-08-09 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$Y.K/WAOZwx69gWwKoPjTpvXCgCd99aSjc5pMAH3TGeAD0sCDUb6l6','admin','ak_3a0fc338ad1a7722','2023-05-12 10:08:00',NULL);

