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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$iNfnhaSCMXdGH9xx6PXnuDxfLjcsJrwN1zNXREWK9MwEhcm5qYahD','user','ak_c61878003f8c0bb7','2023-10-19 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$lIDF9WbuHkwYy3Dfp3pX.MZggMRx5Fe7XbwWYTRm8MN0RNB5jcyYM','user','ak_df4727f2fe02b5e0','2023-04-25 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$uMflh8EFPwIpqURYuFX2b8tA./iDwNi9ZN.acnCTdYjZufnKk8Vic','user','ak_be426be4db3f8c74','2023-03-21 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$JSIBlGipgolzZe6UKBmj8NlgaU1mE4A1bPmHyLEj97I1W7OVRkXck','admin','ak_4452206bf60ff2a1','2023-11-12 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$6YMtr4i4115/p0OrBtuVe9NQOVeihrzbhsea31oM.VSae5iWsKPFN','admin','ak_c948381e1df2b429','2023-07-25 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'root@corp.net','$2b$12$Evb7u8SCsqi7AjBPoVf7oihtShxoQt1ZPiTDfRkB0fjRDeCC2wjav','user','ak_52dbf6a2b0018e26','2023-06-06 10:06:00',NULL);

