feat: enforce tenant isolation and shared question bank

This commit is contained in:
2026-07-27 16:59:12 +08:00
parent 28e9a9fa41
commit db4c7b4496
137 changed files with 6402 additions and 112274 deletions

View File

@@ -7,17 +7,10 @@ public sealed class QuestionBank : AuditableTenantEntity
{
public Guid? RegionId { get; set; }
public string Name { get; set; } = string.Empty;
public QuestionBankScope SourceScope { get; set; } = QuestionBankScope.Tenant;
public QuestionBankStatus Status { get; set; } = QuestionBankStatus.Active;
public JsonElement Metadata { get; set; } = JsonDefaults.Object();
}
public enum QuestionBankScope
{
Platform,
Tenant
}
public enum QuestionBankStatus
{
Active,
@@ -55,7 +48,7 @@ public enum QuestionStatus
Archived
}
public sealed class QuestionVersion : Entity
public sealed class QuestionVersion : Entity, ITenantOwned
{
public Guid TenantId { get; set; }
public Guid QuestionId { get; set; }