MiscCommand.cs 869 B

123456789101112131415161718192021222324252627282930
  1. using Masuit.MyBlogs.Core.Models.Entity;
  2. using Masuit.MyBlogs.Core.Models.Enum;
  3. using Masuit.MyBlogs.Core.Models.Validation;
  4. using System.ComponentModel.DataAnnotations;
  5. namespace Masuit.MyBlogs.Core.Models.Command
  6. {
  7. /// <summary>
  8. /// 杂项页输入模型
  9. /// </summary>
  10. public class MiscCommand : BaseEntity
  11. {
  12. public MiscCommand()
  13. {
  14. Status = Status.Display;
  15. }
  16. /// <summary>
  17. /// 标题
  18. /// </summary>
  19. [Required(ErrorMessage = "标题不能为空!"), MaxLength(64, ErrorMessage = "标题最长支持64个字符!"), MinLength(4, ErrorMessage = "标题至少4个字符!")]
  20. public string Title { get; set; }
  21. /// <summary>
  22. /// 内容
  23. /// </summary>
  24. [Required(ErrorMessage = "内容不能为空!"), SubmitCheck(100000, false)]
  25. public string Content { get; set; }
  26. }
  27. }