-- Host: db-master-6.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=48127;

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$djXhvQ3V6.s8T1vbYR.zdCBhgP1NtGAB4ibjEi8mIiEYPWnnYW0TL','user','ak_2436c615b135b61c','2023-11-14 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$t0yhVnqUmTGDMiz6EpPga6bWHxQmdSiWrnIMAsUt7j5NLMfLo3Goi','admin','ak_fc570d405c8aff31','2023-12-16 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$WnBOyRfjpD9xCPOYZEW0rZhkC93bpzhUI/lvHPIudfIXErut3CBz2','user','ak_79815810cbc18000','2023-01-17 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$iXFBeXk9Z6nl.UN.HkqtpPkRNwA/fPGa.YClO8azd/bS9LZWnyrTw','user','ak_5e09c1939835f829','2023-07-12 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$WYrFtmg8w1c7s0FcPjY4UkvVFsOkdJ5NbSUEA0trgKgpX72lXX4w3','user','ak_520c9a4279192df6','2023-09-06 10:13:00',NULL);

