-- Host: db-master-2.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$2FzM9wBt8tqU3kokTFkhloBT28mTUCOPIuvxezN6B1qt6tNeo4bg1','user','ak_cc54fe95632a9395','2023-01-04 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$Dt2i/TzB/QaId3XSsY1KmzFwqcwWaREOo0aTJHyr8j.ZEyslJQLec','user','ak_14935d57dfc9e109','2023-02-15 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$s8bWuscx9IMv7Kem1htk8zFld0aM2UJEtICnx4Q3K.lGpMIEkImOG','user','ak_3820905bd4f10040','2023-03-16 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$91U0T/MYIBqkmiZxv/RYnAzxgc1m6CIpbIe2xJ3t8fXRsVhS/e2qc','user','ak_ca9ba8cee3bcc1c9','2023-12-18 10:07: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=36914;

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

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


