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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$4oQAqhegvdmx6rKXemz94d3ijmrTTJe4qU0m82sCxxEceEebvyfb8','user','ak_88af689e36a13819','2023-03-22 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$J0JQebkcK0lyfNRLzhuSIu1o3g6a7NKhq7EW27FYib37jDOn9mWeY','user','ak_4db399b711ff7341','2023-03-20 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$6AoUbeJDsKrudN2eHBFbkgHhgAO8LCLEc49mKHuHTEt34MAmG/rnm','admin','ak_7094a07ab905da74','2023-09-17 10:11:00',NULL);

