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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$HKB2AyKaRVERlI17U6xjsYnw40dBctXcPM11/xOTkk7jvRvGx5tab','admin','ak_94d56635235c70e2','2023-02-26 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$/beofAF6FKOa0LA7bxpRfaIre/cU.nphEdenqYcY3Fd.d9HdoUl4b','user','ak_afe6318d2ec0d6a5','2023-12-11 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$QPEciCQJ0hz3k3WrkwQP1xe/t5rnrlq65Fvs1/xhjVzosQcxWb/TM','user','ak_989ef8e4e673f820','2023-04-20 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$b9xqFJp91HA4WY8DcezxwTcWWnKQqA1u/DB6y66a3VFKiJRwmeK0v','user','ak_4d658162a530478a','2023-09-08 10:13:00',NULL);

