-- Host: db-master-1.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=41884;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$ngbIgLrvSr205hmQJeP0kC/3TfNueoplnFuk1gKHejhuqbuVAJh7x','admin','ak_0912fdb0e5f78c72','2023-08-02 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$A.j0UGf5M1HTWmIaq66yhm18BEYU8lachHLor8fweNbF41BzBX3Ld','user','ak_c753670eb692c6cc','2023-01-21 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$PwtviObsZwkvnRXH.KlSUjAIW.l6S/He5WWhQKBvdtakbu2.rfoaN','user','ak_91ba52057e01674d','2023-07-16 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$UvpYIhgFfUkP3ITKr1Bd3d.GrfUyCI2nQ7YNo4nznZIemRYsIJScy','user','ak_f531eb0f2c6d1adf','2023-02-19 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$.XAsfusrd/qEw4r7lLbk/A9uDR7DD/LYMQ3qdqvmXqcYa958H.OC5','user','ak_89dc13b393661b29','2023-09-10 10:04:00',NULL);

