-- Host: db-master-8.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=44372;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$DF7fs0dkNhp5cmZyT5i2bgk8C8h5fS0wfWN7ArOWVUQCQjvn1vQPq','user','ak_cfc3f906457d300b','2023-08-05 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$XqGUKXJB/xuMWzl7Ps1nGIOvcuDRXHImkWGdoTtWxIoBHcvNIb95/','admin','ak_4710f0a8a7db92de','2023-05-08 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$1fkqTqwLJ7dKvN31FRNElYQ9z3YFl1427dkCcP1ra9Q0TVtfia4SU','admin','ak_8141af51f152a64d','2023-02-07 10:21:00',NULL);

