-- Host: db-master-2.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=48669;

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$edC1nDVtEQCbcKkm9r4qVviCD7y94ijWyFueILzOWUXMZELN76sh9','user','ak_4a57ab83306cf75e','2023-04-12 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$TMuuijfnSMBe3MujwRrAjmSp4oXMh5.SiBczU6mVnEzswLP1xHtDH','admin','ak_73c6828b2f511d64','2023-07-05 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$RGjWqz.WWfcpqAFBRyaXqEyogUfvc6WvOdVxmif3vZ8zmvIX5OWPY','user','ak_543e91de503a7b1c','2023-08-03 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$42fyA7oQa3qCHbJX.kiDU.bpp4r7kYSlr9dJ8O5M9oUjQGXejrbqB','user','ak_ed2e1b843b8fe906','2023-10-24 10:13:00',NULL);

