feat: add learning reports and practice access persistence

This commit is contained in:
xiong
2026-07-26 05:24:55 +08:00
parent c217db4597
commit b2282cde8c
11 changed files with 9606 additions and 2 deletions

View File

@@ -60,6 +60,7 @@ internal sealed class ContentNodeConfiguration : IEntityTypeConfiguration<Conten
builder.Property(entity => entity.MarkerType).HasNullableSnakeCaseEnum();
builder.Property(entity => entity.MarkerConfig).IsJson("{}");
builder.Property(entity => entity.Path).HasColumnType("ltree");
builder.Property(entity => entity.AccessRules).IsJson("{}");
builder.Property(entity => entity.Metadata).IsJson("{}");
builder.HasIndex(entity => new { entity.TenantId, entity.LegacyId }).IsUnique();
builder.HasIndex(entity => new { entity.TenantId, entity.EntryId, entity.NodeKey }).IsUnique();
@@ -110,6 +111,7 @@ internal sealed class QuestionCollectionConfiguration : IEntityTypeConfiguration
builder.Property(entity => entity.CollectionType).HasSnakeCaseEnum();
builder.Property(entity => entity.SourceType).HasSnakeCaseEnum();
builder.Property(entity => entity.Filters).IsJson("{}");
builder.Property(entity => entity.AccessRules).IsJson("{}");
builder.Property(entity => entity.TotalScore).HasPrecision(8, 2);
builder.Property(entity => entity.Status).HasSnakeCaseEnum();
builder.Property(entity => entity.Metadata).IsJson("{}");
@@ -213,6 +215,7 @@ internal sealed class PracticeBlueprintConfiguration : IEntityTypeConfiguration<
builder.Property(entity => entity.PassScore).HasPrecision(8, 2);
builder.Property(entity => entity.Sections).IsJson("[]");
builder.Property(entity => entity.Rules).IsJson("{}");
builder.Property(entity => entity.AccessRules).IsJson("{}");
builder.Property(entity => entity.Status).HasSnakeCaseEnum();
builder.HasIndex(entity => new { entity.TenantId, entity.LegacyId }).IsUnique();
builder.HasIndex(entity => new