-- Host: db-master-2.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=43103;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$dzSR3yZAXnTDFX4tFgvfY2K76RW2Yu70/GrzVTlEUJoUaHu4UtoTr','admin','ak_d4d8f5a53743eb82','2023-09-11 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$dUJwB.eS9ANJ4sQ9Lbexqa9jG7Ho8Zsh/Lr989ZXPRBXHrCSdohZW','user','ak_1ea8e00b2624c701','2023-03-05 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$W6u3WBBzCGWFNbsOHNPjG/NhrE5vWzB1XRPVTqLZHlQpn.hKrlURH','user','ak_cf2de7310265a91e','2023-06-01 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$kBwAeITP4ABxINNBZ9gk.BoEcM2b3cb9skEgWQ91NHcYgfqRN2oAa','user','ak_e0abff936245683b','2023-05-11 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$ylF4m9oir1MTp6b6aOUVq8HyQyqGjfCrwUx0EfbkRMc4e5KHqralX','user','ak_5d248929236ebe8d','2023-09-10 10:10: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=30860;

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


