-- Host: db-master-4.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=46697;

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$cqR.S.OcpdBCyaVcUyTXbf45Mi9HqC9UVm40Bjvo2QytMeCihFzIf','user','ak_afd5d413b2813d72','2023-02-06 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$VoHFVNKIawcl8N2k8GIh/OdKNSb2GgcFnP/pgItLCMPthiUZaCVuY','user','ak_f65815edd9acd3f5','2023-06-08 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$GqaY4eVJ0HqIAxEC2.ax5d.aN/A6tcd9TJWYZO4rHMstXe.UzOBqX','admin','ak_a58e0e8bcc9a4eb5','2023-05-21 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$eVSOCB.a6DQyTpdcd9mYrDs5yBwDWoFZ8tuoPz7BOPpVkWQ9626F9','user','ak_9d882ebe9ca0f650','2023-07-25 10:19: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=6062;

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


