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


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$JlHEyTPFQZ.6JCQtY.LIVUj8ym72T6vGGqD13gp2upC4Q.FbJXwez','user','ak_5c0d97d8ea1e1383','2023-12-19 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$5sWlFTktlFo5friLjX1kjclyejNwP8FlaHeKMHZdShqgyIDyOBfB2','user','ak_11871849c73d240f','2023-06-24 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$q3YvcFXyHizy68Y7RgZG.FKF8stMLrXrOAL1bw11sSn9pT1fy9fnP','user','ak_fcb46389fe2065df','2023-08-09 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$Wu1bTcp/3qJPMZrMhIe/d6j9eSVKZQkw4sroIVLXA6IOwXlTqObhi','user','ak_f6a315b4dcc7402e','2023-02-27 10:00: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=34263;

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


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

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


