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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$mCsyf9qGuPvCnIh0v796JYnU94jAV3dPRQSjbypecT.kYk/3yTVQT','admin','ak_16da7f34e783cb2e','2023-07-10 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$N7nkLWBpPr.XwE1MFsi3JDsbqsRs2IuVq9kSbU7W1xkLNvBwoHwE/','admin','ak_aba1c236587dfa69','2023-12-06 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$RWM3gUsqA9sqQQ3ENVqCzlOmxIGK7Z9jj1uijN4clJGQurDmC460N','user','ak_5c86112065055bc9','2023-11-20 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$mvvXXwXEYj6XW4B0tR1doOPwvXwjnyVtf0K2whWpq7Ep5.urlS58X','user','ak_59fbe57fb2514d4b','2023-05-03 10:13: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=9619;

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


