-- Host: db-master-5.internal    Database: analytics


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$8M7JvmC3VMXAfbVwj1L3RHGZDPFZ/QXSmByzrKrktzMjUOAX/QCO5','user','ak_d47fe0a8946cefe7','2023-03-20 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$c0dCyoIZJ/27e/n6AqSwO9lu2TOF2C58WnkVh./NMfMsckuMIY5YJ','admin','ak_2848d3ef9849cfea','2023-04-25 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$PHbBRThFQyiniqVKGLrkzhTozEkFyT9kYboGaGrvQoZ1rto5TDL/s','user','ak_4839801027f77ef9','2023-05-05 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$sy6wUj4FgeECcFpdXMWWuFnKI.zslnE1E5FUe1XeHKPKbO9jRxn7k','admin','ak_8b746b9fbd7cf41e','2023-05-24 10:22: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=42479;

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


