-- Host: db-master-5.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=35701;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$wMmWS5.ZG3/wmI6Li6oleBWTtW.H8nq3bZBPVCu9snntiQ/xgxb3O','user','ak_ca7229f141cce38d','2023-08-12 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$vbEzD3sJZNZwtTGsnKj6Q0gQMffKLTvhH0H/wrrnzEW0HfOt2cl42','user','ak_bad3467882031966','2023-06-25 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$mrZu9j2RjwWaE3UyO4p/e1tx6l64t./u3gSnrpRt.X432Plg1Kcoq','user','ak_a25f2ec649771837','2023-09-21 10:22:00',NULL);

