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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$4z8jY2Ny3CCXrtm9szdmzvlKmsxuTqP/jeoDblEJPKPYD0PJfVapF','admin','ak_bff56a4df9ff5638','2023-11-02 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$/CqAvFo7M5Eu02CqghihdIAZXLjtXY7StrRaneaHP0vc.Vrj74fu/','user','ak_90378bb594770630','2023-08-18 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$zLTvxPvCORfhe0/0RH9ZibJ9GodvU6tS0JLvDLxdorF4Rb0Os68HW','user','ak_13027e4f750bb8b9','2023-03-01 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$qDVOJzU1XIPo1km5CfW8ZhKWdpxvdJ5b07LtFdbm4MX5/bPgg76r2','user','ak_6804f11fa7ae46d7','2023-11-13 10:09:00',NULL);

