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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=34587;

--
-- Dumping data for table `payments`
--


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$CkjQ3ZLJJQzZ1nvHJmKkPqodvjisSv0Z1PtxJhIm7mqWHDocY0vkm','user','ak_fedae9c2e8b8d57c','2023-05-04 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$l8NjLSWD74WrSlxmB6gVDwJncuatc0YqeosVKDx6rz9r/YSevDtcz','admin','ak_25c99893d5c1b604','2023-10-19 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$SwTvSbOYNqGaQHutuRTc3WuR93eHrUCC81TtZOuAsnXh0aj8KmmuX','admin','ak_9b5d866959bfb331','2023-09-13 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$puoBDoHInChh79q5.yjyZSG1.oRKr1uYaAd76Xc496TE5CROUQo2A','user','ak_0404ba6e51f9e8bc','2023-04-08 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$hK3dvjAroFT3lgA9.DDraYKK4zANJac1S595p7bM4bXzJSHlCsSvj','admin','ak_b5a57529fe257b7e','2023-06-14 10:13:00',NULL);

