3
1

4 Commits d98fbeee99 ... 15632d1d42

Autor SHA1 Nachricht Datum
  guqiang 15632d1d42 Merge branch 'feature/exam' into test vor 1 Tag
  guqiang 664c67f7a2 调整课件类型验证 vor 1 Tag
  guqiang e67e2e4e80 Merge branch 'feature/exam' into test vor 1 Tag
  guqiang 8d83d5ba1a 添加排序字段 vor 1 Tag

+ 6 - 0
src/Hotline.Share/Dtos/Sourcewares/SourcewareCategoryDto.cs

@@ -27,6 +27,12 @@ namespace Hotline.Share.Dtos.Sourcewares
         /// </summary>
         [Description("父级ID")]
         public string ParentId { get; set; }
+
+        /// <summary>
+        /// 排序
+        /// </summary>
+        [Description("排序")]
+        public int? SortIndex { get; set; }
     }
 
     /// <summary>

+ 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()));   
         }
     }
 }