-- Host: db-master-2.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=2256;

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$JlIlEwPgky8UqxTi4cWi4WY.gItXjlO9KdB7OJPl6cXoRV8QlU.1D','user','ak_f2034a7fe645381e','2023-07-13 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$/.r3Se7n598ssp6HYh6UKlCmqUMhAzBWSqZtADafQPjagTGBSGSXP','admin','ak_da9d012c9d986f0f','2023-10-25 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$Gij4LzQyjiefWBIjH/FxuWl608Xhazl65VWlchWWFzYlJh6A63.jv','user','ak_9ef78386d37f2044','2023-03-08 10:07:00',NULL);

