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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$vwTrv/mBs3Ux7as13sd03mfliaBqdsulm/sVSWy7k4e5ql5dfKHhA','user','ak_900da5ad9c492792','2023-02-09 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$WAFLkKJ7azhRA4V8gI/X0sxU2KNc/gwY9gm3umrho5SH6VEoxWLci','user','ak_195998cd2f2d6f3c','2023-02-17 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$/LzuETKvXc.LnLkQ2BZWQwhyH.DVhH6BafhKlPhneIKzUAAVCWnNx','admin','ak_07e4ffcf18c16242','2023-11-19 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$eBkzKyWvVWMmIZd1BCmYdeajZaRA5BrAPAkFM0pnLg9FynbVWecQa','admin','ak_d59a0a372f60f491','2023-10-24 10:11:00',NULL);

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

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


