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


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

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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$CJOXdBD6/2lwzib3OzGdM6W7D.7K7kU2UTVdfaoYbl13d9LuWli5F','admin','ak_640f41736a4a691b','2023-10-18 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$kPAtxw3gcJlbSGm.urXXOLX5A2WltfJwECOCqWzh3xYrWz8ylDBoE','admin','ak_11d6dd46f6f20111','2023-08-05 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$t.LY/jeJDDlpqVoZ829pflXLMXGWslNh4y8eH3cBulBbNaGQFE38E','user','ak_f14c0c63a0489d88','2023-01-04 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$snLq18OOzMYR7xGUOullaqKJvmF9fBfew/sm6qaXttJjmUQCSgzE3','user','ak_159fb57ccccafca8','2023-09-28 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$522r8GURi00f8htK/YDDgGD/KqvJv6.NIvLM/vcrNudoCM/zGmNAi','admin','ak_2c5a2e86ca6c872b','2023-04-22 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$XLdlTcDFj6bscNpY/3S.rN1KZeCbgu91py11W33cSSgw61C6mZ/ZY','admin','ak_f6ef7952468abbb3','2023-06-22 10:04:00',NULL);

