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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$dM03Di7AnidJboqJhb/hNsGMXBTiCxQ3zrhVpEFQNV207RYiYAu42','user','ak_af81eae78f551c28','2023-07-04 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$OYibYH7h1PqMqeJKn9TMEPbzbjL.AaVcUeINKD19ZV6zgEbmiCd0n','user','ak_830f2e34927498eb','2023-01-10 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$4bkQnKT/acBbd.VTa93nPHmW7BcQiivghRnQO8AVNzyzFJS6A0U2R','admin','ak_7520c72dc56ac1a5','2023-08-06 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$7ypuUSRxhlqxb50nSvh39.fzCRaKbC4EhfUTXb9k3DJjzXvicLW4M','user','ak_2dd331e6588c9b36','2023-04-26 10:01: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=31099;

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


