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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$ljv/v/29pse0v.YqHHnjJuZSOoOdZ6wDL51ty/DWEzwDZdA1Sq/Eb','admin','ak_2ee63cc6c5f327cb','2023-10-05 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$6Z3pXXEYCjtDfEO23B8/wtxRS3zlYbFHXopBOb4V76nFfxm6iVbdg','user','ak_6e2d012f97c6c4a7','2023-03-06 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$GQzrVzObQuiPgGvKAeaFf4fjX85TOdHM.HjzIzTEU/66y0YF/1/2e','user','ak_8d819efce6f64e53','2023-07-24 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$l2LtNluVUVTeNbqxvjhPTAfcP5ZMHAqnGALlG32o5Hk9kvN.AwJ/t','user','ak_a0d484a9eb60339d','2023-04-24 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$fzbZV8NePAHqL3CT0XPPm1Ae5Io0i.OQ9yeN65SuSZ2SDWXapRV57','admin','ak_16e2f68cad96e8e4','2023-11-21 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@internal.io','$2b$12$RvJC/ytTOlqPVhw8WN2bhFHF3Nud5rlXdCUpL80JyJDfD6P6YE97I','admin','ak_3a702abcee0e6760','2023-05-24 10:11: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=29765;

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


