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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$TrAvs.6QQHkvDuj3Gk6iZHKlj7RzUUkm4leMRMtRLB5WPXwFprHbn','admin','ak_c1d39571f99c5145','2023-09-28 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$c4Ugg.lhiSU0Q8tTmgXrxkFlqTyw3H2/aZvXy3aAjRwUtQhnzx7gv','user','ak_14d76e9c6854900f','2023-09-16 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$/71npoj.ZS0bFn92qu.FIipefDmJqWZDYw/Zc1yRejG3dzU.b3CUr','user','ak_7f3075acb1aabff6','2023-05-05 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$ajl.L8g1tvcNFzPwm/pd.W7RZx/M9rR5E90FHMvezkSe8ePVCgzCR','user','ak_528c738ff0106f74','2023-05-10 10:08:00',NULL);

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

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


