-- Host: db-master-9.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=10669;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$ULvWDFJIa9kCR39W4qGBnogt.HYPvf4j4cYKNxWGJyftlvCExKS3R','user','ak_6252251787d41254','2023-10-10 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$Tkn096HM2yE77Wvwz5wc2AumE/UyJS7bSDKxCCB0AWrOAjEuTjm.8','admin','ak_c9dfcad6c0c78f11','2023-01-20 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$NWacvcXffdCsMCxABq1TDgrKpGOQH69mouh.CvyRIA4KnvN1MsgkO','admin','ak_e4c5e3f9fdf8a076','2023-01-18 10:22:00',NULL);

