-- Host: db-master-2.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=39223;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$IxIxNcFldBskK6U5dDFw8XCUNxQL5B3lheHB2b2tfmPpw3tSwnZZO','user','ak_8935dcebf26edb81','2023-08-13 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$Z/SSoEsbJ0g/w0OB2nhaLQrJwkW75wblyDY.0JCS/D60TOp6cVmfl','user','ak_bca83b3f4d2d2de6','2023-06-13 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$epBalTExKEpT0kUEvArwZfL3cFIK.SGauHlrfm/lDNMn2Kxky0B4f','admin','ak_3fdcfe2fd8d7cbd5','2023-11-18 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$LjOFUG4miIKmJkSTtLJ0v.Hu8bd0YCC9CGStNGBgrGfoPELNFwuOm','user','ak_2bb45d61b7b4bbd5','2023-02-22 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$uZ.olcJMi/YgR3pf3XQqpyn76EtwbgwfEnJ3OZ53Dg9qrt3/eiezE','user','ak_8aca4cdcc0adf29b','2023-09-24 10:16:00',NULL);

