feat: add student profile endpoints

This commit is contained in:
xiong
2026-07-26 18:36:28 +08:00
parent 5715869d29
commit 387b85342a
12 changed files with 16275 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
using System.ComponentModel.DataAnnotations;
using System.Text.Json;
using Tiku.Application.Profile;
namespace Tiku.Api.Contracts;
public sealed class ProfileQueryDto
{
[Range(1, 50)]
public int? RecentLimit { get; set; }
[Range(1, 20)]
public int? Limit { get; set; }
}
public sealed class UpdateProfileDto
{
[StringLength(100)]
public string? Name { get; set; }
[StringLength(32)]
public string? AvatarPreset { get; set; }
public Guid? RegionId { get; set; }
public Guid? SelectedSchoolId { get; set; }
public Guid? SelectedMajorId { get; set; }
public JsonElement? Stats { get; set; }
public JsonElement? Progress { get; set; }
public JsonElement? ModuleSelections { get; set; }
public JsonElement? RecentActivities { get; set; }
public UpdateProfileCommand ToCommand()
{
return new UpdateProfileCommand(
Name,
AvatarPreset,
RegionId,
SelectedSchoolId,
SelectedMajorId,
Stats,
Progress,
ModuleSelections,
RecentActivities);
}
}