-- Host: db-master-9.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=13993;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$WgTnTZP4aGXLSLWVZUNptgLPCCoVD7hlb9pg8rol1NMJwJrw/c4t8','user','ak_e167ef96cf285338','2023-01-24 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$yAnb6KVJ.i6bACc5J5kQ25a4DmOIBqpDv6JeAVX.SM4inR64sVk1h','user','ak_1151920715055db7','2023-02-05 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$/yG86JNtlsDQac55b2vHiP25No1d.8sMdKggEMRNccDMMT.hd/Sj/','user','ak_62b947d79d0a5b86','2023-01-26 10:11: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=1574;

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


