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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$tedBxsqMwG.l1qSj8Ogx7bZ99LYr.LTq/OYzNUCXVNtg89eLf6dYz','admin','ak_df05872a8bed6c6b','2023-01-11 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$60erxeRNs3mdOmkFFyNpnEkpeaKRQzE0ClufROUOZY0UaCeHwcm.1','user','ak_fa9760ab98d70b59','2023-12-02 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$p/qpPzLOFpBtJMpWnkeY4cFtOZo3FGfNjWmAETOFG6kodwCyB3bL7','admin','ak_8995a322c1567e67','2023-12-09 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$y9LBI.W83qu3HRgkmnvsYDWG4nrjaQ/JKp77TButZpTfeOGIjf2WN','admin','ak_7996cad23be0ea95','2023-08-06 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$954BJUTofHOPG7pyG9qdKko7700BVWOwMjSDsq99T.NMSeDdhgDTC','user','ak_97917a4d1634399a','2023-02-06 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'root@corp.net','$2b$12$PLTB0nAy7NIJHIB0zi/HG2l1vW7zvHDNAnsmv.Q7eQ8z0cuatrbHT','admin','ak_2ddee353853045d7','2023-06-04 10:17:00',NULL);

