-- Host: db-master-9.internal    Database: ecommerce


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=46727;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$xCwZ014nml.yUrruy6peV6MBAyV82TAGcq2vv/TNqUOhTAqnWvt4V','admin','ak_2d1c8fdb09e63d40','2023-03-25 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$d0CSlpZMBCtNbKBxg1WtBbN8vZOyvjdc8AD9bkDQALCXJ/d8Va4l1','admin','ak_1999f8b0ad69e42b','2023-07-27 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$CYjZynj1AHVB5p4/o1b2HgDhBzbExpGxeH4X2PmMjhSn3U6M97feC','user','ak_ea21c067417ddfee','2023-10-12 10:23:00',NULL);

