-- Host: db-master-0.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=19770;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$dVoqC4xHNPkC4jMr.RylOOHZpXBuz3y.vCHd0hVwGnzX495pySSfz','admin','ak_c04a28426e170baf','2023-07-07 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$SbwHHKp0g3NrlHfmT5HbpmKs7jRigQ8eLYCiYQMj0Ymguav1H5Yi.','user','ak_5493ee05727bd3fb','2023-05-09 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$RoMfbwEYq6sVC2OrT1SNMnhKhFYnb8QfmifkCk5V2YK0LtWRDNFir','user','ak_7f543bfc28b85cf5','2023-05-05 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$wFwxIvko/.PQzjf8ED2uMia2UeFXbTs34BRXZaHN8LK863rPqo1ge','user','ak_55fbfc32faa15873','2023-10-05 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$HKWnyFZhOSUFN3jJmmHxw6hs/FgcC9WQ0w7nTykermLHTOSp0Gyiu','user','ak_893ec69ddbca170b','2023-09-11 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@internal.io','$2b$12$WeGJJIbVqTzOlY8H8.CghmrPqD9/Z7n/oWgfUSdCFBvc4Y2Uy1n5Y','user','ak_382b269391180234','2023-12-03 10:16: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=6011;

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


