From 7a1585f122a491bbae7e6eed0351ea660ded4687 Mon Sep 17 00:00:00 2001 From: huydinhdevopssoftware Date: Thu, 3 Dec 2026 12:20:54 +0700 Subject: [PATCH] feat(mentor-ai): add AI class content generation, ZIP/Excel import, and update learning path & homework services --- .../Configuration/ContentPassageConfig.cs | 5 ----- .../Configuration/MockQuestionConfig.cs | 19 ------------------- .../Configuration/MockTestConfig.cs | 5 ----- 3 files changed, 29 deletions(-) diff --git a/RikiPath.Infrastructure/Configuration/ContentPassageConfig.cs b/RikiPath.Infrastructure/Configuration/ContentPassageConfig.cs index 246dd05..422342f 100644 --- a/RikiPath.Infrastructure/Configuration/ContentPassageConfig.cs +++ b/RikiPath.Infrastructure/Configuration/ContentPassageConfig.cs @@ -18,11 +18,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SourceReference).HasMaxLength(300); builder.Property(x => x.AiProvenanceJson).HasColumnType("jsonb"); builder.Property(x => x.ContentFingerprint).IsRequired().HasMaxLength(64); - // Retain legacy publication columns created by the canonical migrations. - // Review state now lives in ContentApprovalRequests/ContentBankItems. - builder.Property("PublishStatus"); - builder.Property("PublishedAt").HasColumnType("timestamp without time zone"); - // ContentPassage chỉ có hai quan hệ: // MockTestSection (1) -> ContentPassage (N), // ContentPassage (1) -> MockQuestion (N). diff --git a/RikiPath.Infrastructure/Configuration/MockQuestionConfig.cs b/RikiPath.Infrastructure/Configuration/MockQuestionConfig.cs index 8eb81e1..c80b7db 100644 --- a/RikiPath.Infrastructure/Configuration/MockQuestionConfig.cs +++ b/RikiPath.Infrastructure/Configuration/MockQuestionConfig.cs @@ -28,22 +28,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.Topic).HasMaxLength(150); builder.Property(x => x.MockTestSectionId).HasColumnName("PracticeTestSectionId"); builder.Property(x => x.AudioTranscript).HasColumnType("text"); - // These legacy columns and relationships still exist in the migration chain. - // Keep them mapped while the active review data is stored in ContentBankItems. - builder.Property("CertificateLevelId"); - builder.Property("LanguageSkillId"); - builder.Property("PublishStatus"); - builder.Property("PublishedAt").HasColumnType("timestamp without time zone"); - builder.Property("RightsStatus").HasMaxLength(100); - builder.Property("SourceQuestionId"); - - builder.HasOne().WithMany() - .HasForeignKey("CertificateLevelId").OnDelete(DeleteBehavior.Restrict).IsRequired(); - builder.HasOne().WithMany() - .HasForeignKey("LanguageSkillId").OnDelete(DeleteBehavior.Restrict).IsRequired(); - builder.HasOne().WithMany() - .HasForeignKey("SourceQuestionId").OnDelete(DeleteBehavior.SetNull); - builder.HasOne(x => x.Passage) .WithMany(x => x.Questions) .HasForeignKey(x => x.PassageId) @@ -56,9 +40,6 @@ public void Configure(EntityTypeBuilder builder) builder.HasIndex(x => x.QuestionIdentity); builder.HasIndex(x => x.ContentFingerprint); - builder.HasIndex("LanguageSkillId"); - builder.HasIndex("SourceQuestionId"); - builder.HasIndex("CertificateLevelId", "LanguageSkillId", "PublishStatus", "IsArchivedVersion"); builder.HasIndex(x => new { x.MockTestSectionId, x.IsArchivedVersion }); } } diff --git a/RikiPath.Infrastructure/Configuration/MockTestConfig.cs b/RikiPath.Infrastructure/Configuration/MockTestConfig.cs index c29d78c..ddc585c 100644 --- a/RikiPath.Infrastructure/Configuration/MockTestConfig.cs +++ b/RikiPath.Infrastructure/Configuration/MockTestConfig.cs @@ -17,11 +17,6 @@ public void Configure(EntityTypeBuilder builder) builder.Property(x => x.SourceReference).HasMaxLength(300); builder.Property(x => x.BlueprintPolicyJson).HasColumnType("jsonb"); builder.Property(x => x.AiProvenanceJson).HasColumnType("jsonb"); - // Preserve legacy metadata without restoring it to the current domain API. - builder.Property("PublishStatus"); - builder.Property("PublishedAt").HasColumnType("timestamp without time zone"); - builder.Property("RightsStatus").HasMaxLength(100); - builder.HasOne(x => x.CertificateLevel) .WithMany(x => x.MockTests) .HasForeignKey(x => x.CertificateLevelId)