forked from gongxuegit/tiku-backend.net
feat: add student engagement endpoints
This commit is contained in:
@@ -11,6 +11,17 @@ public sealed class ProfileQueryDto
|
||||
|
||||
[Range(1, 20)]
|
||||
public int? Limit { get; set; }
|
||||
|
||||
[StringLength(32)]
|
||||
public string? Status { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string? Category { get; set; }
|
||||
|
||||
public bool IncludeLocked { get; set; }
|
||||
}
|
||||
|
||||
public sealed class UpdateProfileDto
|
||||
@@ -43,3 +54,60 @@ public sealed class UpdateProfileDto
|
||||
RecentActivities);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class NotificationStatusDto
|
||||
{
|
||||
[Required]
|
||||
[MinLength(1)]
|
||||
[MaxLength(100)]
|
||||
public IReadOnlyCollection<Guid> NotificationIds { get; set; } = [];
|
||||
|
||||
[StringLength(32)]
|
||||
public string? Status { get; set; }
|
||||
|
||||
public UpdateNotificationStatusCommand ToCommand()
|
||||
{
|
||||
return new UpdateNotificationStatusCommand(NotificationIds, Status);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class SubmitFeedbackDto
|
||||
{
|
||||
public Guid? QuestionId { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string? Type { get; set; }
|
||||
|
||||
[StringLength(100)]
|
||||
public string? Category { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string? Title { get; set; }
|
||||
|
||||
[Required]
|
||||
[StringLength(5000)]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
[StringLength(32)]
|
||||
public string? Priority { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string? Contact { get; set; }
|
||||
|
||||
public JsonElement Attachments { get; set; } = JsonSerializer.SerializeToElement(Array.Empty<object>());
|
||||
public JsonElement Metadata { get; set; } = JsonSerializer.SerializeToElement(new { });
|
||||
|
||||
public SubmitFeedbackCommand ToCommand()
|
||||
{
|
||||
return new SubmitFeedbackCommand(
|
||||
QuestionId,
|
||||
Type,
|
||||
Category,
|
||||
Title,
|
||||
Description,
|
||||
Priority,
|
||||
Contact,
|
||||
Attachments,
|
||||
Metadata);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user