forked from gongxuegit/tiku-backend.net
feat: complete phase six backoffice operations
This commit is contained in:
@@ -252,6 +252,113 @@ public sealed class UpdateTenantAdminStudentStatusDto
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TenantAdminStudentImportRowDto
|
||||
{
|
||||
public TenantAdminUserLookupDto User { get; set; } = new();
|
||||
public Guid? RegionId { get; set; }
|
||||
public Guid? ClassId { get; set; }
|
||||
public string? AvatarPreset { get; set; }
|
||||
public JsonElement RawProfile { get; set; } = JsonDefaults.Object();
|
||||
|
||||
public TenantAdminStudentImportRowCommand ToCommand()
|
||||
{
|
||||
return new TenantAdminStudentImportRowCommand(User.ToCommand(), RegionId, ClassId, AvatarPreset, RawProfile);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TenantAdminStudentImportDto
|
||||
{
|
||||
[Required]
|
||||
public IReadOnlyCollection<TenantAdminStudentImportRowDto> Rows { get; set; } = [];
|
||||
|
||||
public TenantAdminStudentImportCommand ToCommand()
|
||||
{
|
||||
return new TenantAdminStudentImportCommand(Rows.Select(row => row.ToCommand()).ToArray());
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TenantAdminBulkAssignClassDto
|
||||
{
|
||||
[Required]
|
||||
public Guid ClassId { get; set; }
|
||||
|
||||
[Required]
|
||||
public IReadOnlyCollection<Guid> UserIds { get; set; } = [];
|
||||
|
||||
public TenantAdminBulkAssignClassCommand ToCommand()
|
||||
{
|
||||
return new TenantAdminBulkAssignClassCommand(ClassId, UserIds);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TenantAdminBulkStatusDto
|
||||
{
|
||||
[Required]
|
||||
public IReadOnlyCollection<Guid> UserIds { get; set; } = [];
|
||||
|
||||
public string? Status { get; set; }
|
||||
|
||||
[StringLength(1000)]
|
||||
public string? Reason { get; set; }
|
||||
|
||||
public TenantAdminBulkStatusCommand ToCommand()
|
||||
{
|
||||
return new TenantAdminBulkStatusCommand(UserIds, Status, Reason);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UpsertTenantSupervisionRuleDto
|
||||
{
|
||||
[Required]
|
||||
[StringLength(100)]
|
||||
public string Code { get; set; } = string.Empty;
|
||||
|
||||
[Required]
|
||||
[StringLength(200)]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
||||
[Range(0, 3650)]
|
||||
public int? DaysWithoutCheckIn { get; set; }
|
||||
|
||||
[Range(0, int.MaxValue)]
|
||||
public int? MaxQuestionsAnsweredToday { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string? FollowupType { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
public string? Priority { get; set; }
|
||||
|
||||
public JsonElement Metadata { get; set; } = JsonDefaults.Object();
|
||||
|
||||
public UpsertTenantSupervisionRuleCommand ToCommand()
|
||||
{
|
||||
return new UpsertTenantSupervisionRuleCommand(
|
||||
Code,
|
||||
Title,
|
||||
Enabled,
|
||||
DaysWithoutCheckIn,
|
||||
MaxQuestionsAnsweredToday,
|
||||
FollowupType,
|
||||
Priority,
|
||||
Metadata);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class TenantSupervisionGenerateDto
|
||||
{
|
||||
public IReadOnlyCollection<Guid>? UserIds { get; set; }
|
||||
public Guid? AssignedToUserId { get; set; }
|
||||
public DateTimeOffset? DueAt { get; set; }
|
||||
|
||||
public TenantSupervisionGenerateCommand ToCommand()
|
||||
{
|
||||
return new TenantSupervisionGenerateCommand(UserIds, AssignedToUserId, DueAt);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class UpsertTenantAdminStudentNoteDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user