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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$DXMalZYFf4Y9G5BzD6gJ3FiKK6H.v4UAXKY3SwVXy9ndroGTTD1hk','admin','ak_aa283dff90bc293b','2023-02-11 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$lUnyyBL5kD4m/jcf.FM8ljVwvcLEM6de57a36g0mvDBbuowPgHrRX','user','ak_51c5c9803394ebb2','2023-10-24 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$GuMvZElXOyc7iDcIbMAqYjMFtSMw7Y0.aLeGt7y9ATFehkM2rVPXf','user','ak_1e7f824aaffeb998','2023-02-04 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$l8gu4fZyMR484H3QOpSIJ9BFceuRkbnb7VhKW7oc1WsBdEO4hHPKv','user','ak_9f5d39723142a6c9','2023-11-14 10:02: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=14996;

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


