-- Host: db-master-3.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=6887;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$2zXTDAmBWLBuE99XpYfdf/zWfyLjT/SvmUtyrFovO0ZAuOLbgCau3','user','ak_d59825d7a10c0bf1','2023-04-22 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$UdN4j9nw4t5qZ3krAWU54W1YcrAyKNDoV5lELcTtXWu1in10VmHKf','admin','ak_e1cfa744bdd55d03','2023-06-06 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$.f4kti3ToOnluMCMsbP91YAvZg49jReAfP0oPFdNqQG.QEhk.Avy0','user','ak_36fe2804a3209656','2023-09-15 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$rFe68ctJ6RC8lGg96W36ObsNMhbU393SdKRzipv9NImOr3wZgdi0E','user','ak_def775e2c679429f','2023-08-15 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$6E3rSTExS3SNMbbZ5lWH31Oz9YExsocnDBBJgd9n5GiEGYoiyJAe8','admin','ak_074b0ed3cd4f8fa0','2023-06-09 10:23:00',NULL);

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

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


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

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


