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


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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$E6Z5uzNwwaiu8b0uKefegpo3bNbxvAXWRs55I6StrlR2g5uQaktyW','user','ak_bf18e767889ddc0f','2023-07-15 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$9DaekjYhbnhFET33r94A75nscSVpevueA2qzb98PICQev484TpRrf','user','ak_6c00e897bd97b597','2023-02-02 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$eFSSrb2O3TO.NZ8YaPXlLuO4GZasrLw9KvTpGhiTyrq6MWJbBDVIC','user','ak_1fd9e572710fe8e8','2023-06-11 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$YpDogHj4hoPbTG7Xa.1JdCGwqE1BLxB12mLaIINf5RczjRSG27wgE','admin','ak_c246a8b633d9b176','2023-12-09 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$wxD7G7fyVY04dgQ6.VWp5MSk9Qbqdod8uwUG9VEovjlIG5EIfxhff','user','ak_21320f8e0e42a554','2023-07-26 10:22: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=23861;

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


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

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


