89 lines
3.1 KiB
C#
89 lines
3.1 KiB
C#
using Tiku.Domain.Common;
|
|
|
|
namespace Tiku.Domain.Content;
|
|
|
|
public sealed class TargetDimensionDefinition : AuditableEntity
|
|
{
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public bool IsHierarchical { get; set; } = true;
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public sealed class TargetNode : AuditableEntity
|
|
{
|
|
public Guid TargetDimensionDefinitionId { get; set; }
|
|
public Guid? ParentId { get; set; }
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public string Path { get; set; } = string.Empty;
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public sealed class ExamTargetProfile : AuditableEntity
|
|
{
|
|
public Guid BusinessLineId { get; set; }
|
|
public string Code { get; set; } = string.Empty;
|
|
public string Name { get; set; } = string.Empty;
|
|
public Guid? CurrentVersionId { get; set; }
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public sealed class ExamTargetProfileVersion : Entity
|
|
{
|
|
public Guid ExamTargetProfileId { get; set; }
|
|
public int VersionNo { get; set; } = 1;
|
|
public string DisplayName { get; set; } = string.Empty;
|
|
public int? ExamYear { get; set; }
|
|
public ContentDefinitionStatus Status { get; set; } = ContentDefinitionStatus.Draft;
|
|
public DateTimeOffset? PublishedAt { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
|
}
|
|
|
|
public sealed class ExamTargetProfileValue : Entity
|
|
{
|
|
public Guid ExamTargetProfileVersionId { get; set; }
|
|
public Guid TargetDimensionDefinitionId { get; set; }
|
|
public Guid TargetNodeId { get; set; }
|
|
}
|
|
|
|
public sealed class BusinessTargetPolicy : AuditableEntity
|
|
{
|
|
public Guid BusinessLineId { get; set; }
|
|
public Guid? CurrentVersionId { get; set; }
|
|
public bool IsActive { get; set; } = true;
|
|
}
|
|
|
|
public sealed class BusinessTargetPolicyVersion : Entity
|
|
{
|
|
public Guid BusinessTargetPolicyId { get; set; }
|
|
public int VersionNo { get; set; } = 1;
|
|
public int MaxActiveTargets { get; set; } = 16;
|
|
public int MaxPrimaryTargets { get; set; } = 1;
|
|
public int MaxAlternateTargets { get; set; }
|
|
public int TargetChangeCooldownDays { get; set; } = 30;
|
|
public bool IncludesBaseContent { get; set; }
|
|
public TargetSelectionMode SelectionMode { get; set; } = TargetSelectionMode.SingleFromTenantLicense;
|
|
public ContentDefinitionStatus Status { get; set; } = ContentDefinitionStatus.Draft;
|
|
public DateTimeOffset? PublishedAt { get; set; }
|
|
public DateTimeOffset CreatedAt { get; set; } = DateTimeOffset.UtcNow;
|
|
}
|
|
|
|
public sealed class BusinessTargetDimensionRequirement : Entity
|
|
{
|
|
public Guid BusinessTargetPolicyVersionId { get; set; }
|
|
public Guid TargetDimensionDefinitionId { get; set; }
|
|
public int MinValues { get; set; } = 1;
|
|
public int MaxValues { get; set; } = 1;
|
|
public bool RequiredForProfile { get; set; } = true;
|
|
public int SortOrder { get; set; }
|
|
}
|
|
|
|
public enum TargetSelectionMode
|
|
{
|
|
SingleFromTenantLicense,
|
|
BasePlusEntitledTargets,
|
|
BasePlusPrimaryAndEntitledAlternates,
|
|
EntitlementDefined
|
|
}
|