-- Host: db-master-3.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=40881;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$jvVe6XYjYaFqmKxkziMhSwnvv1PNm1hGzVi1pqeFsRC7h9YyesVI2','user','ak_8d8fb4ab05aa4cdf','2023-04-13 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$0PeHBxRfiZXfw9.JM29Va0rjTUej9rbnYrjX2HlVGClKtORhwZ/Pc','admin','ak_eefc1e10adaf04d2','2023-10-18 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$VdVJnh83NbCgT5RB7w26DuwINxYaboWIxvkFhGLcHD.lcdAjx6oE.','user','ak_8d4ca612c74497e3','2023-04-24 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$8lnPSOqRI8ZHuNQYO7ja3l6hG5YLFBI5zHY3TIn/bthEXAGeHVbHC','user','ak_a0741ab3d8260e79','2023-02-02 10:10:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=33625;

--
-- Dumping data for table `sessions`
--


