-- Host: db-master-8.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=39626;

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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$kk6uSEnKFqTWFdf9Rv3p3HrcJmpc0esfOkN32n/3BAtGzMf0dQz1Z','user','ak_b9292915f7e49e20','2023-12-22 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$8.33aNZWG.KiXpRuxOkxBvrGb58iuwkiQE0FQXJdLtqUV0M124Ctz','user','ak_bed808e2e6d6930f','2023-12-11 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$O/3hsYlIgnuguttKHQY9aeFjr5i2N2VLh4uslEpxA/fVE0nlqwkJf','admin','ak_398242f3de7fe72d','2023-09-17 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$jKFgA8OYj7/gjZncp//y.iIDqcEnogWxYl3gGLT2AmGhuoPIdtjJE','user','ak_8a23fc6cb9ce07ec','2023-03-19 10:06:00',NULL);

