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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=11517;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$ZHAew2XzWmjJBdrbfkVP7f6mbHb9wMvyOuXEdObS25a/gehgJLdAz','user','ak_085f958fcb79939f','2023-09-05 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$bjb0Q6pdwiqK1qoTVnYMELzSi3wfqsXSX.dK3XJHLKaZqYYqQ/6x9','user','ak_8c067b153411817b','2023-11-02 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$6KyQwGrVl1Vrp9z55k8VIqzeOKTmbWmkMHi6bMHRAIB4B122UE4A1','user','ak_89644ea06dc1e767','2023-12-05 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$tfhrMCTv/RsqCJsD0JiURumlZMtgAgUtb15sbbQc6ds7/j6KSZJ/K','user','ak_55a23cb5ccd1454f','2023-09-15 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$oTefZ75TKTlEiI1NJFymcRI83F80Cj0r8AamWNaCXVINBMYxBhcyH','user','ak_a9b32c37e7d04695','2023-09-19 10:11:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@company.com','$2b$12$hf5DZkVBcqGTN1xxwqYdNXCD7fjNNese3nSBEXFwZCRyGe2FVud81','user','ak_263e1792d3b87f89','2023-07-19 10:20:00',NULL);

