-- Host: db-master-0.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=1484;

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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$RZIx..YdGNUz96LBxR8uLjipiJoQ.zh1RS1srQHT.TRE2NDF9LDfK','user','ak_84b433afe430afbf','2023-06-04 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$gFEbz44.mjGMlxRRebJOudmssJtRyrO7yS7g5TH2uZPsNwFJiTQ8P','user','ak_f47b0df26045ef05','2023-05-06 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$v8vpJ.pVCHAn9QjbtNAsdvOjS0wT05NfLc9lTrN/yHlpx2KEyslIR','user','ak_8907a85c47bfcd69','2023-11-07 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$krlyzJ6NM1.CvGW6Itiwjlwy5pCRphC6m4N0DjLyfYsM9Qxy1ucBD','user','ak_5b31989caab306ba','2023-01-05 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$EOS30OQGMpEdpQX5ZTP302Nt.KnMYSjZhf.ntV6GDbBvQRYAB9Iyr','user','ak_8eec146a3daf4c55','2023-02-08 10:23:00',NULL);

