-- Host: db-master-4.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=47275;

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$M5xHjm/7PVuaW9CEAFiXNwCjeLsjRFyTLz4wUmjoNvNl6fy7oNX/S','user','ak_fbc56c158409faeb','2023-11-07 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$ZE7K9mY6GzLMGzwtlW6iD.0PcNvg5hnsOJnj3EUYPQo/96HcupGON','admin','ak_533c4b14bcdd6269','2023-03-04 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$QX4gYyb.cbRzMfiCVfnx4j31lOLSIsDrwi.V22IQK3MWrKvfhVLvX','user','ak_80773e1da25c2402','2023-08-26 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$s88J1mjvRWux3xy04eBv1kuKD2l25dsq3L2u/Yy0g41lcNsPcCOsC','user','ak_b8b7ed7366556e9c','2023-05-22 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$egSAQBfDNZi4TPCiYIl3RNuKXZoAyH1rr0S9vk20qd5zot74HzkBT','user','ak_fb7c356df4a14989','2023-01-25 10:01: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=16335;

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

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


