-- Host: db-master-6.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=33827;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$BAFLE6J0d6e88WThBj.GmoEp7Vuuk/4hesaf6aFjelWM2F8ts3MaH','user','ak_48a160d260b1a38e','2023-08-11 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$BEEt2.nq.isrEvLMHVf2aFV/RKjicmzOhxXg..WuG/3mae2lqfW3v','admin','ak_94c7cee74d97db48','2023-03-25 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$VX3xgGLXaLtQ333Dozy2U2nZpHKCNrl7gxsLFBoGDrm37oxP1bGtU','user','ak_f109d1f9e3cf27f1','2023-08-27 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$.jTFFp4VhbETIDYNseVuTmEeZ09mts.MXsYGX/BzGbTsbcbD7rw.T','user','ak_a8a77223368a74e3','2023-05-17 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=8704;

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


