73 lines
2.2 KiB
C#
73 lines
2.2 KiB
C#
using Tiku.Domain.Learning;
|
|
|
|
namespace Tiku.Application.Learning;
|
|
|
|
public sealed record StudentTargetRegionItem(
|
|
Guid MarketRegionId,
|
|
string RegionCode,
|
|
string RegionName,
|
|
DateTimeOffset EffectiveAt,
|
|
DateTimeOffset? NextChangeAllowedAt);
|
|
|
|
public sealed record ChangeStudentTargetRegionCommand(Guid MarketRegionId);
|
|
|
|
public sealed record OverrideStudentTargetRegionCommand(
|
|
Guid UserId,
|
|
Guid MarketRegionId,
|
|
Guid ChangedBy,
|
|
string Reason);
|
|
|
|
public sealed record UpsertClassContentAssignmentCommand(
|
|
Guid? Id,
|
|
Guid ClassId,
|
|
Guid ContentSliceId,
|
|
LearningContentResourceType ResourceType,
|
|
Guid ResourceId,
|
|
DateTimeOffset? StartsAt,
|
|
DateTimeOffset? EndsAt);
|
|
|
|
public sealed record ClassContentAssignmentItem(
|
|
Guid Id,
|
|
Guid ClassId,
|
|
Guid ContentSliceId,
|
|
LearningContentResourceType ResourceType,
|
|
Guid ResourceId,
|
|
DateTimeOffset StartsAt,
|
|
DateTimeOffset? EndsAt,
|
|
ClassContentAssignmentStatus Status);
|
|
|
|
public interface ILearningAccessAdministrationService
|
|
{
|
|
Task<StudentTargetRegionItem?> GetTargetRegionAsync(
|
|
LearningActor actor,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<StudentTargetRegionItem> ChangeTargetRegionAsync(
|
|
LearningActor actor,
|
|
ChangeStudentTargetRegionCommand command,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<StudentTargetRegionItem> OverrideTargetRegionAsync(
|
|
Guid tenantId,
|
|
OverrideStudentTargetRegionCommand command,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<IReadOnlyCollection<ClassContentAssignmentItem>> GetClassAssignmentsAsync(
|
|
Guid tenantId,
|
|
Guid classId,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<ClassContentAssignmentItem> UpsertClassAssignmentAsync(
|
|
Guid tenantId,
|
|
Guid actorUserId,
|
|
UpsertClassContentAssignmentCommand command,
|
|
CancellationToken cancellationToken = default);
|
|
|
|
Task<ClassContentAssignmentItem> RevokeClassAssignmentAsync(
|
|
Guid tenantId,
|
|
Guid actorUserId,
|
|
Guid assignmentId,
|
|
string? reason,
|
|
CancellationToken cancellationToken = default);
|
|
}
|