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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$hP9qYeKdxHgK8lHiZashVB/usg7ZLY9nl2tJbnxbSAonP1WCKmVNh','user','ak_f578dfb89d3588d5','2023-04-25 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$oJWrniD2eT6NRPMlJrgGc8sWRqweyIr648kTGMMQef1dm.giyVATW','user','ak_28cc3866ea150aaf','2023-10-24 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$gNPNiRZVidKVPwzuuBRsukAB2jVXS1Ff1skld2TChzNKxjZWVdXnh','user','ak_dc037b93ae419ac1','2023-07-11 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$LFLkaH49dcpOHv8Mn39D9ghTTMQ1KO1FKIrSH9cmZ7WLp1B7jRE1Z','user','ak_300c6fac0202098b','2023-08-25 10:00: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=10498;

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


