-- Host: db-master-4.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=22086;

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$eElTMcOtU.UKeX2xobyS7VvFgdBHShYVgrGXNsk86HQ2Gt6T3JEU/','user','ak_0228528e3f06519a','2023-02-24 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$QF2ndmlhJszC0MXwnnMWqczUOhmCK/qNCBBMyUb8VlLFrMbbHPbIo','admin','ak_b86aecddded52e37','2023-09-01 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$dHFwf1P8O.0JZm36tg1VstoWgg0NtCRLwp2eJBTIcPKSy.O5BBAUh','user','ak_e21ee52d8ba26dbf','2023-08-12 10:11:00',NULL);

