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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$MvgnftfAltm99Z4iX8lJcHmRYCHXlIVm7ntO1VKX9IrMm0tFfwdxW','user','ak_46b47a2bc201c8e4','2023-08-02 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$dt.vw1tTDltgnNfAOHr1qaQswvS6y2TlgfgPk0Iw9grLVETOU6XQA','user','ak_e763c66034e8972f','2023-06-05 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$77JMTCsHNJ7aBO2xfyZMEhPVoQdMThAQ0yNTunKblR8vrSP4SO2B0','user','ak_c37903ed230dbad3','2023-12-04 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$BqrcPqPuawjxaqjc0lsHWh5ykpb7a/d9PgdUMTzKGJxND/PebK/ZO','user','ak_c1ce4a2a340d2a74','2023-02-13 10:12: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=48326;

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


