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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$0TN2Q6mQCW.9AaYE1JIKMBiPLJJHmOiTk6t.HcistJ2JsjfJQ4b/p','user','ak_b2084d629b7802c9','2023-05-14 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$JUPrzfDETrknYay1py/qiIAMKWhtFPaDeQlgSbzJSd1B6l7lDT76V','user','ak_1c3b68890e519f1b','2023-02-19 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$YyEiKp0sGY1Mw/VZ.dNdx5qUaT7BjVW8bPBZDYXv72mT4ofIpLK2i','user','ak_1ec2715e700698c6','2023-01-28 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$.YFewDFbNY/tcGWCWd8/CJvR1NCuV4WGPMjYnPP11DrL8W3CkFbcl','user','ak_66783fe627c76d46','2023-11-02 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$93C2CJ2qEmCt2WNNh80njBptdRMsE9K7D6.TDZBz5SmK0Nd1lBMMa','user','ak_7ae3c83573b1a4ed','2023-10-07 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=4650;

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


