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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$N/.6eGyBjV7F2DJTWkchdxmlbw9aiYVYkvlOK5U0LXXXRMWbqk4cQ','user','ak_460dc1520b308677','2023-03-15 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$vf3HL0cZq8fTav0yw4dhZKv6BQuzEBpDvCp3T1aKbdf0p85nQHCsU','admin','ak_328dc3eea1b60a34','2023-05-03 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$XCZ/oozyF4NOCDwmtUdxiPGqC384deJNMVy0l39IwHA9thWPvlD4f','admin','ak_f46ae369e5566d32','2023-02-04 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$7SGVT12HcPdIsm0cuJel.e0WueQDWSlcEK7W5Mv91Jp9un7jBI4k1','user','ak_7dca960cb835ded6','2023-03-27 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$6Nq6S7BNSaa8nwtM4XMYYz1dxLPWjFNcjq5R7E84RijBzMzcpEsDW','user','ak_dd36ebf5ee1ee874','2023-04-09 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$vV3PgVbHETwG0vCeSpeYyPfw5pA1JFiQxztqRQfLIVBYRvy3n6Jio','user','ak_5d6e80b12ad0c0c6','2023-12-26 10:08:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=40652;

--
-- Dumping data for table `audit_log`
--


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

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


