5 Commits 81f6be8e86 ... cd92bc09a0

Tác giả SHA1 Thông báo Ngày
  guqiang cd92bc09a0 Merge branch 'feature/exam' into dev 1 ngày trước cách đây
  guqiang 561a388ea5 Merge branch 'dev' of http://110.188.24.182:10023/Fengwo/hotline into dev 1 ngày trước cách đây
  guqiang 664c67f7a2 调整课件类型验证 1 ngày trước cách đây
  guqiang 594194f3c4 Merge branch 'feature/exam' into dev 1 ngày trước cách đây
  guqiang 8d83d5ba1a 添加排序字段 1 ngày trước cách đây

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