-- Host: db-master-9.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=15371;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$KuwzX915sKDsiXUqBx5inn2m3w6N2BtGTfRdliW8RhtPNVufIjiYw','user','ak_1a3cafd9135babf4','2023-08-08 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$TLm.fHR4Bju2fjvbLJdPX7Xxywkw5MJaGHUgeu/N8WziD3yJiqYIb','user','ak_8ea46fe5f75b8122','2023-02-08 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$KEmGVLfLCkxsCyZXkjuZtEAd3QkV1SVgMyQ3gTDW.k9WhbMv3NehF','user','ak_5987856420dddcfb','2023-10-22 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$hm2BTr/HkBKyjx.Lkg075.WRxFUCkKl2g0NQn95FJVGL8pYJWLvdV','user','ak_4f9ba272dcec3124','2023-11-11 10:13:00',NULL);

