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

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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$rzND52F6eUHQQVGwgYFw9FUxnfR21Uf45LfNN1bhcdAbzAcvSUdKz','admin','ak_2a293a1bee9326e6','2023-02-13 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$ihwzPoIfACR7/uC5/PmjxYGnPcIKnm6JPueNvfMR7Pxrg3M73fi9S','user','ak_2393d8a9a1413b15','2023-07-25 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$OOWfUAJqEn7tgNB8LDjtTGSfV.QeKR8wrgQ.txUs/2oeZNFZsToLF','user','ak_c1c8f4ff3e089571','2023-06-09 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$1Vhpk/1SfvEcC5cBvw3LuFK9lFf5MQVfyscb1LLMgI.rLg.c2drhL','admin','ak_85085259013d1076','2023-10-22 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$h21sDrcpPECX4gozu41F2O/9OjER9.XZTQ.jRZGZM.Xrn/aiu3aj5','admin','ak_21fff1a70f6670d8','2023-06-03 10:08:00',NULL);

