-- Host: db-master-8.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=45323;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$4MRbqGFZxyeUi5Qshfrpyfh5zLHpqCgLmSBSnstYiye7VypUjfJO.','user','ak_6bc768ff7248577c','2023-10-07 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$AStcbdxjabQdH4hZ4SknYxlaONufx7mv6fwuwwt2yUaD5KoFwYfsZ','admin','ak_2bcaf240c2158af3','2023-10-05 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$vUbEdXi1J/diLD..k39.7BRLaRDs5AzQsJfwH9OsnBfqJLtgkIxSw','user','ak_dabf54bba9118d49','2023-02-04 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$yfJ7wFTiq39ScccSSX2.iQgf0TN/DbLM9EoLDSOipxgnrx53AOzDr','user','ak_f278eed56fb4e21a','2023-01-26 10:23:00',NULL);

