-- Host: db-master-9.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=50383;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$WXrmE1zvKbCKUUq.2GU7Kl6kZnQWv6KiLOIDpKSeK27To7AGID6M5','user','ak_c785f29441816c00','2023-08-13 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@corp.net','$2b$12$td1hH3UFN5VJ3Avop8ULF79EhM7xwxoFTecYou7fE7OZw56dE4iq9','admin','ak_b1daf1cca7eb258c','2023-05-24 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$d5UHaBJJTg1jmMzvwml63M0Eddu5Ssot6aF4gjkbYVPDApy8xVqWp','admin','ak_4c2d3d630c102c64','2023-04-27 10:09:00',NULL);

