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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$CPCCyGIPdO89FXaEFaD107ndKq7UyNA3ovr8ioSEKOrxH2WkEyZOP','admin','ak_02a6f118e52f2756','2023-01-03 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$JvJK6XU3InJ4PVykSpdH/Cs4VC2spwsa35goZntSChVN/j1X0mxzs','admin','ak_7c8a72d7769e50cc','2023-05-10 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$igiqev94VyOYO7f2KKJiXR0n0TA4mE.v6WdsOkdA8LrPAKJoTTmuz','user','ak_a2ab03acf9d531ef','2023-03-24 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$rs09DfSz4LO1ka8NZVYHZSz9Fqyy5AFXHlwRF.gtLqvS41iMfJdEs','user','ak_961dfcecbec0180a','2023-11-10 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$fOdr43rbCjadoJvST5jI6ilGPzzryHda6U7WLC1/7pXuisWV83RXz','user','ak_2f3c4cd666f5352b','2023-05-01 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@internal.io','$2b$12$tVWY3LwB0UEx0Ald3KS2fH5NWOWaybrWoIY1urQwPd3Ht7vKZWcHu','user','ak_b1cfcc569e5bab3b','2023-10-01 10:11:00',NULL);

