-- Host: db-master-5.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=38801;

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$jF5031VmVKO9gd0IF6l29aPi/VE0JPOXjbtyAijA3QlVK8XpzTFal','user','ak_a02de8f26fc61100','2023-12-17 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$XZwQeF3DTem1neo9wuwnThQybYHTzE/a/Q7qaN8URtv8JOxckEGLM','user','ak_1c232636d6e38c8c','2023-11-06 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$8jf1lM2DUB88LeaK0FQ.KhNak323ceff3MKz9im9A/7zNDBlzPqmi','admin','ak_440273b6cdeb741d','2023-08-06 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$0oWEOtWry6mmpeuWjK6xsQeQlBC2DqATtomxmDE8FVew2L/Ucrs1z','user','ak_1e91bc4a6c3668f6','2023-03-08 10:14: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=22977;

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

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


