-- Host: db-master-9.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=41217;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$sGpjgztjCMxlGkzS9Yqp3XVILW3fQTGUq12WTfOZ6YaHK/ZF8unkT','user','ak_c1058852304a6c4b','2023-04-03 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$BcAly7J2uVwuDmmYyfsUeXlHaZrz9mgq45E.mBRYg9fuBKmhK2wLC','user','ak_9bbc98c6e159d91e','2023-06-24 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$MtJRNOkDdrmzglXh0k3RTj9qa.L7XBrcyM4MxVgAc1tGJbKl7O0PU','user','ak_1db831e6e5965546','2023-07-01 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$fw3uXRatOb6jGVXvnIebDl56msUj0JnVaBLlFaQM7FMhQe8ciVwp/','user','ak_1893fa8d02e0dab6','2023-05-19 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$8Nov8S/7AuuEwHzHUzjrtEryEPuLLPRm0bmpYzEUau83Sh.fIz/XG','user','ak_c2f23f4b9b363099','2023-02-13 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$jLHdHq7xAuJ6st/gDfun/8yS.1CXW5b9ykPRZkSG2ye64YuqWHYys','admin','ak_be006c5a2524988a','2023-05-06 10:02: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=42580;

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


