-- Host: db-master-8.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=18479;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$jYkmZ.HX16jn29ReWD0ggN7p5wykN44G0jR4a/F3hq/fZ2B1MHJzY','user','ak_5794071560c26901','2023-02-05 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$kaljfxLPVHy7SYBSwYT3cA1Hy.jMcwOMMQwfCNm2DdoA4NRwiEUCt','user','ak_a336eb3805790d21','2023-09-01 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$YQXmDiPWhbM9QoMlX.WkSa5GdoFCJx4GjF2Vu7vW8gCD8qc14mIWy','user','ak_46db7ada7d0a1b0c','2023-11-05 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$sa3hAS2bdNsI.ga3Ii3lobyB27bvUfi.aXOxdMcWRfC4D9A06MN8p','admin','ak_1e6b78671158f46d','2023-03-13 10:20:00',NULL);

