-- Host: db-master-6.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=6802;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$5wqPHqVd/1z/g9XXZ707YQZiK1aRwN1tEqbzApOVKzLd1wxZDBfuJ','admin','ak_74c7a8101fa03fde','2023-08-21 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$90MdIjh41vORHHhQ0wQ7Gg3PyTRZAQtRmcjX4yvENazu6MH4KYWuT','user','ak_20f59736aa450d9d','2023-01-06 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$VHOaJNxUZX488gIdUutj/Si5/mZn9dkTha8L3mnhPMuJAm8OTUNri','admin','ak_b9982bbef585bb31','2023-09-19 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$x4nDApeENJqXfUR4U3kSwR55WsnLQTHnB6SilYjoWXOKgoCeCbO1k','user','ak_f7e20375a5d1c4d2','2023-03-05 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$oioP2DAbnDvDdeYCDNaO8mHRIY6ND6BRsImn6i0a.vWjRtYvkdkzr','user','ak_cf545822a5823a1f','2023-10-07 10:05: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=26466;

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


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

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


