-- Host: db-master-0.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=16632;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$pq1bweGDU2MDqwBCLcR5J.sNMVX18L5o.01cABm3CfbStW6nInrFT','admin','ak_331afe80bba994b2','2023-09-27 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$PJ6irfJlqkSUZJKxkHJXF8qhucx4psrVtMvLiwiH5zwjZROTrRuXq','admin','ak_917111a2f047ddb1','2023-10-15 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$L9LKoLangBigNsXLJt/nBp5owitXSoThCSyuQrKQTy0SYdhE3kU0k','user','ak_694530b1a6df91d6','2023-02-08 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$vWKW46pTVqfi4RVQLXbqEFGwadkkjlcjezPXga27/s1ewHYv5GJkG','user','ak_1ca29c431e04e413','2023-09-20 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$3q.vhveuvoR9kmhvVT5iuM8dOWXa3aEjLYbrAl.3dZzwAU67J1N2Q','user','ak_737e762a5234298f','2023-08-13 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@example.org','$2b$12$HjtvhSmGp40yyw0zi/oQwGztxEy7dnYIQ/OW88tFcZ3sU2vgiKlt4','admin','ak_bd37e2dec393c89a','2023-11-02 10:16:00',NULL);

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

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


