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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$..7jYWPWcI0VmZJ1xyA5itRMTWFVGKYm9gIUlRcZ3CQ8f9zC9fVFO','admin','ak_ececcd69d84ff529','2023-12-25 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$s87/W4NSZcvztbyPovDDt0SBYtLOx8boNptmR5QJ8H8ESGe0Vy8dG','user','ak_88ed29771672f3b1','2023-10-15 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$D3a7suk8s2aFs4QHYRbrf2D07u3cZmbbuk3zFq0p/rdtMy2oVbLrx','user','ak_26f56f7523c6f13b','2023-02-11 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$qfukJcTZmSpXsxIkL2HW5E0EAOQLRqW3y1pnOdxpGK8XoJWbdXA2X','user','ak_378a2e143f556a6f','2023-01-23 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$syMcjTOZJ6AXGDeNqbC1lpTt0iVp5XWAe.7GrlXW/eoYh8TSx55kT','admin','ak_520ce59028ea2525','2023-02-03 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'admin@internal.io','$2b$12$5V9TcC6NMd01UZVSmr3KulsbcqmR8e02or/SKLayYGA7QjgB4I2PP','user','ak_9939335e6f072d19','2023-01-17 10:02: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=9751;

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


