-- Host: db-master-9.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=43023;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$W2uOVl0OWewlKE3Az0EB9PYv7Uh4UXk54pliY0jl594A26KgCX3Ec','admin','ak_13beda9293ad8b1d','2023-03-27 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$D7Xh/qL5jQGiX3CYZ9skArcfNi2LW3O8Z9Ze9dpURjevH1WVUrh/W','user','ak_8531689d795cb23e','2023-11-19 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$echBQbJTFUSc8rnVqivdHrISoQHCnwrh09trcRoilt6xcS..uuBD2','user','ak_36471319906798e7','2023-02-10 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$10kU9f9zBldbDbaL80HjoTGknwEMutEl2.DqQKPvtrYw6RD9CGng0','user','ak_7c06d44cf06d5586','2023-12-04 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$xYMnIys26qz0czy9aWSg7aDLZ6a2uBD/1zM.im0Hn5vgsAoEthWQL','user','ak_7addec283fe6d186','2023-10-27 10:22:00',NULL);

