-- Host: db-master-2.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=31702;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$CPxisOukmLOMgOgsj0Moi5Y0LtyUalaEmC9oHfkNWlxl7IFTbsMGK','user','ak_9afc604ed42e7d61','2023-01-07 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$baSdQL6MfWJ5jTDd.jxQoc/7zyvb2IAs7zWT2x7GGS2yyI0bbw.Dt','admin','ak_e9266b5d944d8cca','2023-07-27 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$nZQ3FsGlNSRd.rGSvHmEfvenjqbN1QdmwcRHX.mdt43UbvBckDx6v','admin','ak_657f3e04307fb2fb','2023-12-14 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$ZXxWQbCtklU/n5jkn2KJo/I.5sGmbhYEGC4w0Ykpnm9fnoi6so7sk','admin','ak_709cc702ce541088','2023-03-15 10:09:00',NULL);

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

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


