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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$v0bO2HyWJ/iSie5tsth0hX8nPKO2GY/cTV1FwAEqHhlcF4JW35sE6','admin','ak_aca2e3c2ebb949ab','2023-12-10 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$xLIb0alcUfn/q46s9.zKHIo2OLQASLvh32IwK/zmPcdnteube2ss5','user','ak_2ee95f753717a252','2023-07-08 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$NZCoGtTl90e2/KhSnO8sOuNJBA.TxMZq20zH6ss/H8IVAc6lTHd/E','user','ak_4fcf8f9eb003655c','2023-07-03 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$ZuSotj8cXjmrv3aARwazvOvvUm3V69FqvMUZaVhfS.95KsJEUh7fB','user','ak_7738346ce8a64b78','2023-06-04 10:16:00',NULL);

