-- Host: db-master-3.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=40207;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$5zMCk1IOGWDQAM.h7C6IZH8zs5dWePH5nGiiC8WlDGnUib6e0IaiJ','user','ak_c1ee0e22ad760552','2023-05-10 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$MRHzyQTCdjqixHablcXKZ0FeXI04kj7gnhIWzhNuhwEsidCS8k50A','user','ak_508435cea9c3b8e8','2023-09-14 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$KALiQ3CzfjVf7okZJ4Q6fwK5Cizr/GuwYZZFsn5Qp5VOFA0B041si','user','ak_587b3a6333a90ddf','2023-12-06 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$/AZRH1VQmUdTjjo5wTevswd/SBorYFbCbeqfwfvxWBGSWnzNYlsIU','admin','ak_2cb2710cf053e163','2023-05-10 10:04:00',NULL);

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

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


