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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$spxmqL9vjaAsClnBHg4v12O0mxOCZ.TIxzNByYTLcE/JasoL8TGAb','user','ak_8341b729ce85ba7f','2023-11-11 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$pEr3qgicXzlm7lcU2j4DueRiYzItdW2df2GbrbPJiyZh5VeRRXqs5','user','ak_71e0d5c37f16916f','2023-12-28 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$U5XAWAwrxuxA8qlifsZaf/.aScSFSKOOAAKkoTFQlxiBXhXLitmhT','user','ak_454f8adb4ffa06e9','2023-02-24 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$QAylQhzZxpJUwmxLhwQZq62jlVixaWIlh20U0STMpp4IP8OP8rweN','user','ak_5de3005ce8b56550','2023-09-18 10:20: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=25601;

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


