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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$UebYqxdnuwjx89JJperFD7.eMmfkbi/owLzu5kHDzavpbCXgcC9zm','admin','ak_f4540e283d26cfea','2023-11-11 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$YFZ6s/cNCxaFyLhQPX72OwqHMR/4fcpHWU.YwBRA2N2C6dcRb24BX','user','ak_b3804835fbb52ecf','2023-04-24 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$p27l4o32wre3OQeqwt47.t28hDy5..SKEeuj0L7nYLGhAHkJOIHTW','admin','ak_f5b9ffbf4d7f8eaf','2023-09-20 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$FfqCbEbDlU680CJ6ean2L6AXTYvEHwN9eJ.LNx6tpLFz9SkUM4CHM','admin','ak_c92a91c54b85787c','2023-05-06 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$jNdeRcUXzqZR.pQN9yBemeuSo5y4fVlmfTn3c3zeU1dAHVRjivU4n','user','ak_3bbb7c703421f71d','2023-06-01 10:16: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=38627;

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


