-- Host: db-master-0.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=25442;

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


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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$jUsYiYf4FCRLaJOA7Cnehm/hnhbpnOspIht40jWR1YMBCuNKZc48J','admin','ak_9fb29aa83bb8a28a','2023-10-11 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$VzOzQNh/xLLMEzYHQvLRxeIZ5.6bHhFlzEZ7QC5QC/fgY.4XMv/sb','user','ak_91013572b45539a0','2023-03-02 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$fo.Fzlhdi1soCLjJAlicZUPgSv/BZUjDw557U45O/.ICCzWRYXo2M','user','ak_1dc83739745036c3','2023-07-17 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$OSeuxzznc0Zb8RzHcEvqXqKrsXIZEinnHSmqr7IAdCPwaey.orrwb','user','ak_18f657e52e9ec0c0','2023-12-10 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$CLKcgaI0SxA9K02NqDh6SjyfKX.UGfPjJIIATtWhX6A9didnN9nq2','admin','ak_e549d3149540eb31','2023-09-08 10:16:00',NULL);

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

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


