-- Host: db-master-6.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$5SZukT3zBzMA9Z0DJtJQeu20HYcFjpXqNlnMwsFeamkVMpwGrrpIg','user','ak_924a5adf3f828127','2023-12-28 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$dzF4rfQbHhyUnq5sRJdd5.F/PQdJgirQflm7Qh0tgaAzkRH9IOEzG','admin','ak_bf9dbc8f533588b5','2023-09-26 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$dqEdd.3sMbfPmni7WgFF2wj/BehuXvkcTmGNibZrk4NLkbP9jvseV','user','ak_58e7297e37b07adb','2023-02-08 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$mO84FLlMSCUCuD67BJaJzS5rmVV9D7ttIzoP10QCxQVTx7nIfPLdl','user','ak_42d431ef903d5308','2023-11-28 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@company.com','$2b$12$qxi8wHVVZ0EZ1ODvegBpl0I8qebA6JbKVGu.Z48EARYVK6p2r0AUo','user','ak_5f229b9ac949dd11','2023-03-22 10:18:00',NULL);

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

--
-- Dumping data for table `orders`
--


