feat: Implement hackathon status change functionality with audit logging

- Added HackathonStatusChangeRequestDto for status change requests.
- Implemented update_hackathon_status method in HackathonRepository to handle status updates.
- Enhanced HackathonService to validate and process status changes, including audit logging.
- Introduced HackathonAuditLogSchema to track changes and actions related to hackathons.
- Created HackathonAuditRepository for managing audit logs.
- Added validation functions for hackathon operations, including dates, organizers, and prizes.
- Implemented atomic service for creating hackathons with timelines and events, ensuring all-or-nothing behavior.
- Updated mod.rs to include new modules for audit logging and validation.
This commit is contained in:
MythEclipse
2025-10-28 19:55:38 +07:00
parent 95ae55c9df
commit 5cc5a3dfe1
9 changed files with 1284 additions and 36 deletions
@@ -618,4 +618,13 @@ pub struct AdminSensitiveDataDto {
pub struct AdminSensitiveDataResponseDto {
pub data: Vec<AdminSensitiveDataDto>,
pub message: String,
}
}
// Status Change DTOs
#[derive(Clone, Debug, Serialize, Deserialize, ToSchema, Validate)]
pub struct HackathonStatusChangeRequestDto {
pub status: HackathonStatus,
#[serde(skip_serializing_if = "Option::is_none")]
pub reason: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub actor_id: Option<String>,
}