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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$9EOcqQXzogaxsoFB6gG7eWd1LjhJbu4M.2XrHlqM5.cDCZUkqqOlE','admin','ak_1965aabe67d3e922','2023-11-21 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$BJwt8Bc7ANM8xF9APK2skJPAqe16NE/Y.3gNxEFu6yiBJC2spY1Gm','admin','ak_07ec2136ed7b0ec0','2023-02-12 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$JtT4mplmrpHo3Gu.oBKNSer6MZB2nNARv4dNd5M6rLjUjgUDCKwfx','user','ak_9616dc693d7bf268','2023-04-14 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$4nCOCc.FHSZ61Sz.s80ZhR3AyD14XAhzJpU.ItLZ.QmP8n1lJ7DN6','admin','ak_3fee13adeb75e138','2023-04-26 10:11:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=5002;

--
-- Dumping data for table `products`
--


