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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$RMge.PwHVodfDNIN9Gah.7J.D.kHe2FgA3az6mpWOikd.CiDPNuRG','user','ak_a6f860f155c53318','2023-11-04 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$J9df7S11dRiNtVtPyt5Akr.bCn1fozD4ka/XV3NtL6LX52GWxi9Bm','admin','ak_1a62fa6126e4e5d5','2023-01-28 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$5cDFAimdoSF7rowlDSwDsbyf5KZqfYDsdzZDyjOZpSVRYWueLmmlB','user','ak_942caf0800653f60','2023-05-08 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$4B65BYhiF9OwQcbcFs8Ik4q2KqxkjbT8JWY2xHJlDgqpxSVwW7EJG','user','ak_af1a6eaad1f029e4','2023-11-22 10:13: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=4697;

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


