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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$uJn1BT7mDg9pmZFijs7PeVsABl/IJxZujgs6gFGjVQB9ee8JT/n2.','user','ak_729b0e0e1e029323','2023-04-16 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$fEtfhiBI5APzC0Mh8GvDiV9TjAItN.EtXZYPunPWTSMZgMJrXP0hA','user','ak_a682afd05dd5cc32','2023-09-10 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$TwPFAeT.LzHm389b4PZ2ozzTaygrVQKUpt2whGNBXhSrf72tBkSV/','user','ak_fa179cf555b60930','2023-10-24 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=39118;

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


