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:
@@ -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>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user