-- Host: db-master-4.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=14702;

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$VU6pTYI.2XAzEH93rqTvrG3ee6su8Hy5GHp77yU3RQ0GyOF9g5Dhw','user','ak_9ff989204cf942d4','2023-03-01 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$NOKEEaCVtWTjUStjQy56SqYmW5EfaSEjEvhB6tg8UhpQMFCPI46T.','admin','ak_f200056cefed5b01','2023-02-23 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$GpQ5fD1oIPNHCoBBOGKpf9T8x9XCc/h8m5zUOIfyPsW.o.rlIVHus','user','ak_939714679430c8c0','2023-03-25 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$ialtRgdEjJXcBmE78BJvoGN5I57uJnYsU..a30S/RUTarFtNKXWti','user','ak_80185637db094db1','2023-08-27 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$sRHTclQDtWvEWUtlale0NFsLHC6GC/WRmz/N/Hx7D8gcGQPCchKcK','user','ak_3a54424cbe97b6fa','2023-08-04 10:05: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=19826;

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

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


