feat: Enhance Hackathon Timeline Management and Admin Features

- Updated HackathonTimelineCreateRequestDto to accept optional title and name fields.
- Added custom validators for HackathonPhase and date checks in hackathon_dto.rs.
- Implemented admin-sensitive data management DTOs for handling user scores and personal info.
- Introduced new admin routes for managing users, roles, and permissions in IAM module.
- Added timeline enforcement middleware to restrict access based on hackathon phases.
- Created tests for timeline enforcement and admin permissions to ensure proper access control.
- Implemented payment middleware as a placeholder for future payment processing logic.
- Enhanced audit logging middleware for improved error handling and logging.
This commit is contained in:
MythEclipse
2025-10-13 10:57:53 +07:00
parent 6f596efadd
commit 6915a97d79
28 changed files with 1331 additions and 114 deletions
@@ -395,16 +395,17 @@ impl<'a> HackathonRepository<'a> {
let normalized_hackathon_id = self.normalize_id("app_hackathons", &hackathon_id);
let phase_clone = timeline.phase.clone();
let schema = HackathonTimelineSchema {
id: Thing::from((table.clone(), id.clone())),
hackathon_id: Thing::from(("app_hackathons".to_string(), normalized_hackathon_id)),
phase: timeline.phase,
title: timeline.title,
phase: phase_clone.clone(),
title: timeline.title.unwrap_or_else(|| phase_clone.to_string()),
description: timeline.description,
start_date: timeline.start_date,
end_date: timeline.end_date,
is_active: timeline.is_active,
order: timeline.order,
is_active: timeline.is_active.unwrap_or(false),
order: timeline.order.unwrap_or(0),
is_deleted: false,
created_at: Some(get_iso_date()),
updated_at: Some(get_iso_date()),