-- Host: db-master-1.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=50298;

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$7Cd.LjBwyLkwaF4xoPZVqiH8n7elQqMiXchEv/TGkz.eg4OCRopwq','user','ak_de7e5fd10314393b','2023-01-15 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$dmMowbbj6Fn5.Xajc4Nl3LnvAMYHBrmwkVWuEgvmrmaEvXFCjTX24','user','ak_bce8329dd65cd75a','2023-02-22 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$XTGXU00a/TK7Wo1LnINKcabaMg2k5PZu/5k/n2BCbhjlqSvMSv9XA','admin','ak_8262c9c4d5c457a0','2023-07-07 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$QIq7j6yS1KoHxRuJHUYevuDDbzZmEYrlpsaDCN84SRdYk8A8dxI7E','user','ak_27de0e856b23c98e','2023-07-02 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$Pb1W6F4acDAUwMFxr7G2ZX5HmeDiWUpL2Nd9YP42TwEbAwkjF50Gw','user','ak_28f48f94fe2d616a','2023-06-25 10:13: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=16890;

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


