forked from xiongyuxing/tiku-backend.net
feat: enforce tenant isolation and shared question bank
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user