-- Host: db-master-6.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=49233;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$F947DCaL1YbijcseessUe.8VymXi.7osWL0MZ95wqg4vt4/5O7mNN','user','ak_40fa85c7e5d08fa4','2023-11-01 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$/Q9J1KRmLLlstuSSKpOAZBp194WL0nncjxeXfMZg/sVnhNKO9UR4Y','admin','ak_eea7b6a703552745','2023-03-01 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$FZVz6EZkrhwUbewYfIG9bL1AlppJ8nNfhOMxJD0iqHIPSejMSREkO','admin','ak_540d2ba342b1208b','2023-04-21 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$TeFbcQ7s97HjraZPTxvVgf0x7bYvwKvJD3yBa0sfLUbKNt/iWqk6A','admin','ak_faeb208ebf15ad69','2023-03-25 10:04:00',NULL);

