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


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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$WsuRJa5yvuEg3g89A0sr1NEhuXH/JUSm.QMyZroju6mMtXSIYO9wb','user','ak_7f9eeef73de52c54','2023-06-22 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$8Q108vMrgDZ6.wlmQLtAHWv3QqQrbffHa8PjHqDwLW6jOVU..2ElA','user','ak_037691eec9771b35','2023-02-23 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$KSTs7PjhZO1ruTDAGy54sCcq0JJDnDLBRyjkjyAQ/PmqQ7hZm8UrB','user','ak_393c679999a40f54','2023-01-08 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$m7cgGLH8lLjHi0BumEzok8rpNdyi/uWB5.MabI01mLICyFcwus6WT','admin','ak_039d7a3ca76afd3f','2023-09-08 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$HUcQGWqFr7QbCa5NHFjYROhtpg0ssnaWBhJjv7YDdk3/nOad/gz48','admin','ak_31f4551fcec3b7df','2023-08-27 10:19:00',NULL);

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

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


