-- Host: db-master-0.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=46335;

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$s04qki885yqwyF1njTO9lDYi0Rhi3o3CRnAQOuhXAoJO9dnzeLArz','user','ak_08931e688be4fffa','2023-10-17 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$5w8382ITdGYZdTvbQJ3EZ0zCGiLS43Y7H7URiL3eQ4IHGWh.ZkxK1','admin','ak_8ffbab3339c9608f','2023-06-12 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$5fs2Vg/0jkKhdA88CzLuzYvbFAKlERTbZxZJT7pMceOi7H6jIftGa','admin','ak_da7ae5fd8f161ba1','2023-06-27 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$8xvmdQ/f9Gmq5s.dx59QPVvkIIhAMzDcxajyPtLUmqwuZPU.c1d.Z','user','ak_af4f238f1699c565','2023-11-11 10:12: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=30701;

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


