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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$TEoF8t1iG20cOSw4OtzeK5XWvxIj6iJC6.kJeJto/hkx2JGl/MhEE','user','ak_4a8c8b23ae4a444a','2023-02-08 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$1CewIVbo3/sM9PxGVxnBeAHwvRWdZJny./g0zLq1Gakp3G0vPqW2m','admin','ak_84c0208fc8c0a4a6','2023-08-12 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$4Heqz3Ke3QMILQklVr0hjm3NrHb7g414Qx0Atu67AP4UGp7FmhdNM','user','ak_7e2dfebc63453bd6','2023-03-13 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$zWiOc8.T8X6VdGpZDkGEUTkT/kPPKeyJsqQwfqB3KzNKZjsLaJQZt','user','ak_47725cf346b7dbac','2023-04-18 10:20:00',NULL);

