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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=15409;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$uIRg7lPThSY.05h6CMQWanxXOX1Ynj0tXOnWsSzdtGLcFGCMIoFE6','user','ak_399c16e0f89d9f5f','2023-05-04 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$9L1g1sxd5IBaclEpUZFHy/xEbslm2qtm9O5U9XTqTxWHsVq4mEwtQ','admin','ak_654cb140222de4c5','2023-01-06 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$YhD.V51ipX3E2YfUbd3udw2BGrjBoH0z00zj6ORFoN0N3fortv/Nt','user','ak_7dd808a12559ec04','2023-10-08 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$f8R1ZDzL0y1FvID5V9cgj79VSECF2pm/f7bRBy2Coyx2eOs7HTLQd','admin','ak_ec89f95e361d4b83','2023-10-08 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$KL/EeUS04MpapM3YJFuJk1o9VVj9yD61KLQLaIzLSXXgJ5Y3YE9uq','user','ak_8864044d8f85e830','2023-11-10 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$2IPmFJfao6hyPT9C/2KJVxXe6ycicwvJV/P8dz91rLKXL93AtSXHI','user','ak_78ee3a714f4f6f83','2023-05-05 10:16: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=33516;

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


