-- Host: db-master-4.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=19211;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$VsrPzFR.glS7h9HzlvvqWlFFyD2boYFO8OgkxEJCEgBP/IcVhFaS4','user','ak_13fec9434b78bb26','2023-06-24 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$QkwskuN/jmpHWEAczo/cc5TU8DOi1LDVjw46X4JSzPLELa1d/KgqM','user','ak_2c602efe2f9c2c37','2023-03-02 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$zL6oRhjToZBeO8qmzIGV31GicpDDpQmOFsBzbMmEfGGjshBv3D3uY','user','ak_af5c408744534256','2023-07-09 10:19: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=33556;

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


