-- Host: db-master-1.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$nh06zq1VqGiS2gr6BmjSoy0F9oEtSfY5kcbbhCnkteXWfS8kjfHNz','user','ak_d77cedfed2abf690','2023-10-11 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$yrT2TVfFjno4SCX50RFZDG2rSAnCx73NE0YOWy2Mb3LzrMTolF1Zo','user','ak_202fd88b9c1fc456','2023-10-16 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$/t420njM7RWriyeGPNLn/N/5iFRODrc59O/gbI3fZ.IU1gHlRWpGx','user','ak_88f98a26f1a67472','2023-02-12 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$Cj/.KOcTIBUZDZDLtKP0tYn2TojKqNNCG49t0YQLRbi71ZXFkF6cq','user','ak_160b76ed14b51a09','2023-07-10 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$3GcglsdUogCu5M41Ku.GMpsSDei8wRAzIDRdXRFu58hm6qbt3WEnJ','user','ak_2b9b2bbfd82bc36d','2023-03-21 10:04:00',NULL);

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

--
-- Dumping data for table `payments`
--


