-- Host: db-master-4.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=12553;

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$3xl8na2mz1sxYe6V4M9GPJg8o8R/Tp.6gioY24JOOsX8JGJXOJuSm','user','ak_7f8fd2d8c235b185','2023-09-05 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$i2PMvL6PNKkvfTLdrXrvT1fnluBTxQvWPSxCk1/xjpO3el8U1VVzF','user','ak_810caf93840aca98','2023-06-10 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$60xGl0ntWJvrfEyObHgugpFMtvJa7HwzI0GumEbM0sew4ypQlYEVO','user','ak_f09729546af8f3aa','2023-04-24 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$d.u70oARI154QWN1vW/h474AlIB2igEqFEkIz0qkfDrCzGrj3D2Fc','admin','ak_9614aee55b8e6850','2023-10-21 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@corp.net','$2b$12$ZQlz80cWTUxKHuC4Eax31IOgNXT84FLQ/XAukXMOF/m97nubBTm44','user','ak_ef0e16fdb89d204f','2023-04-03 10:05: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=18618;

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


