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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$YUqIMs8uQuPLNmsVTvo7HpBrbGwt8S5NFcrRdOl4zLPmV7KKjQ9k1','user','ak_4d1573d4ef8a7d91','2023-08-03 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$iHhmBbgWdNrQqKT.62ovwpFV1GMcmQYDSNLG/.snKEQabijn1FUYy','admin','ak_a0dfdd7ebe95e784','2023-01-14 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$bWIreY6Y1FvXytp1KeN7kNTFj9GWkkVaNs85Lbgf2uB.m4tWMGuQn','admin','ak_4ae85f833f36941b','2023-09-18 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$nl8MMta9ulop/qy5dY3fALOh/nl2MnhoHqkEYpMBNbZllY6sYc9wi','user','ak_60e599686e7f16a1','2023-05-16 10:23:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$aqsOzEXKzopNOgPgB8leVMA8K6XI7xJa77BRZ9jXt81LjVOan4/My','user','ak_a0cc8ba85d7011b6','2023-08-16 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@corp.net','$2b$12$SD16/dIf1z7TZwfvTiezyxy.T5ctKiSaeYU7xKkQaPe5UnH7Yetrl','user','ak_996656e2f62652a4','2023-10-12 10:11:00',NULL);
INSERT INTO `users` VALUES (7,'service_account@internal.io','$2b$12$LyzZ4BxG6EBysG79ZsPUmSEbR8pvuFt4od1C2MXJRnktMUS8JwGYs','user','ak_755bc5a936862635','2023-04-01 10:13: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=44974;

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


