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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$UvKzxcK.3oC9HRp.I81G.zJEdTEmvkcxNdRfNYf31JmKUddtmCXi3','admin','ak_6b7ae198e0cfb036','2023-09-24 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$c.r3UVT5mkIQM1upb9Asb3yCsIclBFJrEM4eS0Hk3RnR1C9/ASAtx','user','ak_07c977dfb8178477','2023-10-12 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$1oh4Y7lzb6fS16ni270CEB7B3tRKY.Adx85A02coO7YjERE8MKIkW','user','ak_461e1993458ddd0b','2023-07-19 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$fQ7A6trX8z.Fdu/iw72CyVsRCYCrFNr2uV4Wg.PSXNMEEy3.cchgR','user','ak_bc9434ceb41acf0a','2023-04-25 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$/33e3RW83beMqjirsfIsj88MTJQ4sPfHDOHkA/zfUPdAs8UR4EFOi','user','ak_6433b8cdf94f630c','2023-06-12 10:16:00',NULL);

