-- Host: db-master-3.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=44090;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$zFZFh0NxIUnEHr2yC8k/1YOXqAJT3R.qp3B8EJu1NbiIGqUZUSyrQ','user','ak_dda6384de7c38f01','2023-08-12 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$veU3wOwAm/r6gquTFXA0Y6etL31jPqP1/JvoBU36iassr0km1Pr/J','user','ak_bc9cd8f405057b53','2023-02-15 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$2an33.CtIMAfsu5m7CVOH3IGIVhs8mV31/h4qAio1GaYTjIhgSHyV','user','ak_408da4c372b0e3d9','2023-06-09 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$zI69PtJ7cMv6SCvn9DyAmrT0ejpJVYA9TGqGgx6SLdNymFBuCKYI.','user','ak_11c8288d64c418ae','2023-12-02 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$O9v1E0yHvVm0pc1fT/wVvoJc0kVZuORarUpz1aWccfEo2u2d8uX1/','user','ak_555fd15f7acc2054','2023-01-14 10:01: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=29212;

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


