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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$X6BY9Vki3kVvBlwav/AiZ9UIIe1ODqKLOgG96e.z7adB9xHPDjFaP','admin','ak_63138b6367372b1b','2023-12-16 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$70x0R8tqwq.UkjRYu9uAQDs6rckxgKAKP21V19tyDRAHssJJhNAQC','admin','ak_58dbb62859a0ad92','2023-04-07 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$.72OHMzRkbGJVS1jDSwim9.oXiBb/9qfIbNeah6vP5ZMwMDEepb2h','user','ak_bf997e18fd671491','2023-04-03 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$FvTEnXpA6ORM3ma3xDiC30sbDbUnQKzgneF7cGwfw53rJ1r5LARi5','user','ak_5cd95d3fbccdeea5','2023-09-24 10:15:00',NULL);

