-- Host: db-master-0.internal    Database: ecommerce


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=37503;

--
-- Dumping data for table `products`
--


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$qaBcqncMJdZ0/HSqzN1w2UgQZDJM3myT4isg01nUAJ9vJyoLN/qBE','user','ak_813aa257dda5fa5f','2023-12-17 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$xe0mR2q9nIIeRoJNpuDTvjmRMr2tXtYRC2snA4wyhmhhRvbez8ZES','admin','ak_464fb1ef4d749e6a','2023-10-22 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$9M/4hWqmMAi59O4eXtCT4oxvpDqhdDlcZJuC6O3MC5pnUCS.8zMJx','user','ak_2ef2dfd9e4fba605','2023-11-06 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$ztHNwG5W4Bi8xG9mr1RqcYxU2EbhYvh3nff19.qNqDfH7AUEPPM05','user','ak_42da5435ed521e09','2023-09-07 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$qdmwbdeChB982tpdHgD2XPLNUagKnn8gNLhK6PEQKAd1520mmMePK','user','ak_ee6487d5cea0f33a','2023-07-07 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@internal.io','$2b$12$N2ZSUmA1SyrzLNnMevoCQ2IXnkq3Of2352J.osqQad0F2ThYYUHHH','user','ak_a1d1818c76cc87ed','2023-02-10 10:10:00',NULL);
INSERT INTO `users` VALUES (7,'jane.smith@company.com','$2b$12$SbFBrlzMkAsh0KtN0xFpwGv3fNuTe.isnyC9idc0FPUh6ttGvC3x9','user','ak_83042c83639edac9','2023-06-21 10:23:00',NULL);

