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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$h4wCOrfqnnZPKgYA.USXF.qjutspaVv80350T9NdEK51NkdhQAgGE','user','ak_3a7790e7bb43c9e3','2023-08-09 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$2gA.gKV.2mGq/wqZNhticIMyxGKVl4Cicy76wwycKtO8Of8Tg4h9E','user','ak_f98cc811d768ee9b','2023-12-06 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$P/5ryq3nMmDt43.elf00AfJnMoNcHciYl/qs.t9fLNHj3ltL9jrn0','admin','ak_fba04f3e98b430fa','2023-12-09 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$SjXko8iJwYGOyvDJeOPWedVsBUNFMcYdCP43x9dF0XUva.3JOT/Oy','user','ak_f0dd9dc61dea931e','2023-07-24 10:22:00',NULL);

