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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$2/9uTtZH24BNzodlEVwJpaj1uGIUzjXgSMNmfDJ4UqGUcGa17uYFi','user','ak_cf5a1598e91763cc','2023-08-07 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$p2/2VO.3ExjNtH5ezwXOsCukLadOK0XgDxK5B9Pu4rDNEExAPkXR4','admin','ak_134f1f8ead8f8eb4','2023-06-04 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$r36LfqHZWONKgwLVQLW4aNVmU1MsUSKeZlLls8s3LuqEyhs.wlt1O','user','ak_f7dbc70fcec96286','2023-08-17 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$Zt.aahO4w8bNJiLUJS3vOPf352.F6.oHR.SdUus9bTFKY53v6SDDL','user','ak_dc930136e57bf41d','2023-08-01 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$ZzH/kInG9Wu4DWLHXb4HpBX7SDEf3eaqni5a/3d0AXGLiPVefMCsl','user','ak_1f3a27e65864be99','2023-11-28 10:03: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=31941;

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

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


