-- Host: db-master-2.internal    Database: ecommerce


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=32214;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$HacuJW3yfCK3bxQdaUXOic1krTwcjHwjroiybh8L8Ee0.b/xC4IzV','user','ak_5643077799b56094','2023-04-21 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$/oW6UILH8ZskVeq4jzRTCXgnOL4pAK4smMvA2dVLRdnAtUZqYEOqE','admin','ak_d5fee20daa13c89b','2023-12-20 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$20010ErRC0X2JsrTNWWQNUlojKdiAPhuBMYnx3Od0F8p41FKmRpWd','user','ak_48f7e0c568ecbe80','2023-05-20 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$56QxjAWtLWvqqrh.Du4R4t5EKK/TfgLCGGesTx1yEcfAh40YYqKr1','user','ak_8b9774b62a9ba698','2023-09-21 10:06:00',NULL);

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

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


