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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$NIvrYCyIPpMdFqAuLnLo8oOkb9/HMBQVTc1ttOolY/XcoVwiZrT4w','user','ak_ef5a50435fa8a9a3','2023-07-28 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$tD4YKpzirpjTtRE9cGcJQvpV0pvdQykZxVo2UBuEImE4H/XeQp8fZ','admin','ak_529d87475fd52df0','2023-03-21 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$O0jUlqDlrtaawGcpHu3RWZimOblmnZWUByAJTBZIP/T7EmeEJ3Kv5','user','ak_d1d23c9f2dedef86','2023-05-04 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$BkhjBSIp9dvCfn4zNWvWUSFo7A5Dk/jDRMTytzj39KDffeEfnRTM4','user','ak_976b225f6891fbb6','2023-11-22 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$xSDTcgTmrThwy7kADT8cqhAg6PHAr4lbjgylXAg4VDJQbJVoWFKqy','admin','ak_1d3ccfec5efc09ec','2023-01-26 10:06:00',NULL);

