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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=5856;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$jp/ibhdoQlvM.wzQg/yL9Mha58fvf7Ur2ayliBGpMijRrAEolXQBV','admin','ak_2c810835dc1dd2b2','2023-06-10 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$e1yIGru6qwvKB5.ltdP7yKB6RDfrIuxKoGAUvfr8QN59JtzZx0tIr','admin','ak_14ca174172582fa6','2023-09-26 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$4DwTH7zm5OPztICV06U5ORZwMmTcVW9VYfbTZ9kHZl7cNJrZ/goXW','admin','ak_76221dfb6eb12da5','2023-07-07 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$7mxKrK.QT8CnedvdkTbhg7bKHElqqueO7eWnPEcH2RshsqXftHbPx','user','ak_a03c3319529cbd6d','2023-08-12 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$0UMkMK53KMZIHLMTZ7m49z/mJ.ZUlH5wm1iJu7rqDQd6Mkrf2rN0i','user','ak_c4d3c91a1c6717f3','2023-03-25 10:06:00',NULL);

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

--
-- Dumping data for table `payments`
--


