using Tiku.Domain.Learning; namespace Tiku.Application.Learning; public sealed record LearningDictionaryItem( Guid Id, string Code, string Name, string? Kind, bool IsActive, bool? RequiresBaseRegion = null, int? TargetRegionCooldownDays = null); public sealed record UpsertBusinessLineCommand( Guid? Id, string Code, string Name, LearningRegionAccessStrategy RegionAccessStrategy, bool RequiresBaseRegion, int TargetRegionCooldownDays, bool IsActive); public sealed record UpsertMarketRegionCommand( Guid? Id, string Code, string Name, string? ParentCode, bool IsActive); public sealed record TenantLearningLicenseItem( Guid Id, Guid TenantId, Guid BusinessLineId, bool IsPrimary, bool IncludesNational, bool AllowsAnyTargetRegion, LearningLicenseStatus Status, DateTimeOffset StartsAt, DateTimeOffset? EndsAt, long Version, IReadOnlyCollection MarketRegionIds); public sealed record UpsertTenantLearningLicenseCommand( Guid TenantId, Guid? Id, Guid BusinessLineId, bool IsPrimary, bool IncludesNational, bool AllowsAnyTargetRegion, LearningLicenseStatus Status, DateTimeOffset StartsAt, DateTimeOffset? EndsAt, IReadOnlyCollection MarketRegionIds, Guid? BaseMarketRegionId); public sealed record ContentSliceItem( Guid Id, Guid TenantId, Guid BusinessLineId, Guid? MarketRegionId, LearningRegionScopeKind RegionScope, LearningContentResourceType ResourceType, Guid ResourceId, long ContentVersion, ContentSliceStatus Status); public sealed record UpsertContentSliceCommand( Guid TenantId, Guid? Id, Guid BusinessLineId, Guid? MarketRegionId, LearningRegionScopeKind RegionScope, LearningContentResourceType ResourceType, Guid ResourceId, ContentSliceStatus Status); public sealed record LearningProductItem( Guid Id, Guid TenantId, Guid BusinessLineId, string Code, string Name, bool IsActive, IReadOnlyCollection ContentSliceIds); public sealed record UpsertLearningProductCommand( Guid TenantId, Guid? Id, Guid BusinessLineId, string Code, string Name, bool IsActive, IReadOnlyCollection ContentSliceIds); public interface IPlatformLearningAccessAdministrationService { Task> GetBusinessLinesAsync( CancellationToken cancellationToken = default); Task UpsertBusinessLineAsync( UpsertBusinessLineCommand command, CancellationToken cancellationToken = default); Task> GetMarketRegionsAsync( CancellationToken cancellationToken = default); Task UpsertMarketRegionAsync( UpsertMarketRegionCommand command, CancellationToken cancellationToken = default); Task GetTenantLicenseAsync( Guid tenantId, CancellationToken cancellationToken = default); Task UpsertTenantLicenseAsync( UpsertTenantLearningLicenseCommand command, CancellationToken cancellationToken = default); Task> GetContentSlicesAsync( Guid tenantId, CancellationToken cancellationToken = default); Task UpsertContentSliceAsync( UpsertContentSliceCommand command, CancellationToken cancellationToken = default); Task> GetProductsAsync( Guid tenantId, CancellationToken cancellationToken = default); Task UpsertProductAsync( UpsertLearningProductCommand command, CancellationToken cancellationToken = default); }