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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=48763;

--
-- Dumping data for table `sessions`
--


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$zstO1cmaUSjvk53S8lwyTobq9aSu2Pc4WXBf6Ad7o/YM1hZ3o/sMf','admin','ak_6064a0f2b18316c8','2023-10-05 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$g7HDL6hpCJT17sZiw1dV0aORX4HpR1KIUFvI5quMIa7SmkX6DqCNf','user','ak_ec5e7d1869642d86','2023-11-17 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$tG2TaHjvD8LBBTjwG6gFb7QBwOLy2AETOVb3m75hf4rdgCeU4p.ue','user','ak_89fc36ca1c4ea3f0','2023-10-06 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$9r13bD6Mu9iU5GtBpSrtNFNvmudX83R8FzJiwxJ0NnW0sDQbXsg7a','user','ak_ddcc8355debc6e17','2023-06-17 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$1jAwDhKKam7IL73GVcsgaCWEftT8sLabuuRGfZTL3PUGW1h9r9.nA','user','ak_bf6c5c6074473965','2023-06-03 10:11:00',NULL);

