Selaa lähdekoodia

Merge branch 'feature/exam' into dev
合并冲突

guqiang 1 päivä sitten
vanhempi
commit
cd92bc09a0

+ 1 - 1
src/Hotline.Share/Dtos/Sourcewares/SourcewareDto.cs

@@ -33,7 +33,7 @@ namespace Hotline.Share.Dtos.Sourcewares
         /// 课件分类Id
         /// </summary>
         [Description("课件分类Id")]
-        public string CategoryId { get; set; }
+        public string? CategoryId { get; set; }
 
         /// <summary>
         /// 附件Id

+ 0 - 2
src/Hotline/Validators/Exams/Sourcewares/AddSourcewareDtoValidator.cs

@@ -16,8 +16,6 @@ namespace Hotline.Validators.Exams
         public AddSourcewareDtoValidator()
         {
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Name))));
-            RuleFor(m => m.CategoryId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamSourcewareCategory).GetDescription()));
-
         }
     }
 }

+ 0 - 1
src/Hotline/Validators/Exams/Sourcewares/UpdateSourcewareDtoValidator.cs

@@ -12,7 +12,6 @@ namespace Hotline.Validators.Exams
         {
             RuleFor(m => m.Id).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Id))));
             RuleFor(m => m.Name).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, x.GetType().GetDescription(nameof(ExamSourceware.Name))));
-            RuleFor(m => m.CategoryId).NotEmpty().WithMessage(x => string.Format(ExamErrorMessage.IsRequired, typeof(ExamSourcewareCategory).GetDescription()));   
         }
     }
 }