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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$s1JH1AbuZmUm4aUlCtXHeDV.doHTZJu3s1wVP4WzIXWTg6T/vG5JO','user','ak_6cc81e7a186a02fb','2023-06-05 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$muZ7/uXTmLTW66StahMJOvVYSPGyWYabQySAdRERFqtwsYV7HUWBq','admin','ak_897a12da9114b73b','2023-08-15 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$cn5PmxjAvAlPeyD9bT3ZPZyfhboEgF8EFry4gwIOROrhNTPQvlVe5','user','ak_e69747a77cbc65c8','2023-06-14 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$1fICWfAoXktQWokZNXjmz4ZqgyRn1yvDLqsWbvGWgxuiRRF325GLT','user','ak_f0237dc801353dea','2023-05-24 10:23:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=37952;

--
-- Dumping data for table `sessions`
--


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

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


