-- Host: db-master-4.internal    Database: customers


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$Lw87D7R3ZvfR9nP3ePo6WbwW9DhUDrmnfpTYLX9Zs8j/ofuQW3/N.','user','ak_08376fccc9ea5567','2023-10-06 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$niMSsI5MfpxgpIEuPXrHtjIkPHtxvcaCs1Ggtp30eUPuESVUQvAk5','user','ak_447e301c3dd9a35a','2023-02-28 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$WuVe3TjWs/hQqahQAgQh/CEUHqfcZ8SZwwAdKaMIvmAzYzjxXBbPX','user','ak_b5f9305a1e32d288','2023-08-03 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$S3XcxjCzkI2yserXbEvDdn3.zphXtd86c56gYmYuFvIMLJ5RRZIU7','admin','ak_2bad0ea82dfc4c58','2023-06-21 10:04:00',NULL);

