NavigationEntity.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using CZFW.Framework.Attributes;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. namespace CZFW.Framework.Model.Entity
  5. {
  6. /// <summary>
  7. /// 导航
  8. /// </summary>
  9. [Table("cz_navigation")]
  10. public class NavigationEntity : EntityBase
  11. {
  12. [MaxLength(1024)]
  13. [Required]
  14. [Invisible]
  15. [Display(Name = "标识")]
  16. [PropertyOrder(11)]
  17. public string Mark { get; set; }
  18. [Required]
  19. [Invisible]
  20. public string ParentMark { get; set; }
  21. /// <summary>
  22. /// 图标
  23. /// </summary>
  24. [Display(Name = @"图标", Description = "图标")]
  25. [MaxLength(512)]
  26. [PropertyOrder(12)]
  27. public string Icon { get; set; }
  28. /// <summary>
  29. /// 缩略图
  30. /// </summary>
  31. [Display(Name = @"缩略图", Description = "缩略图")]
  32. [MaxLength(512)]
  33. [DataType(DataType.ImageUrl)]
  34. [PropertyOrder(13)]
  35. public string Thumbnail { get; set; }
  36. /// <summary>
  37. /// Url
  38. /// </summary>
  39. [PropertyOrder(14)]
  40. [Display(Name = @"链接", Description = "要跳转到的链接")]
  41. [MaxLength(512)]
  42. public string Url { get; set; }
  43. [PropertyOrder(99)]
  44. [MaxLength(128)]
  45. [Required(ErrorMessage = "名称必须填写")]
  46. [Display(Name = "名称")]
  47. public string Name { get; set; }
  48. [PropertyOrder(11)]
  49. [MaxLength(4096)]
  50. [Display(Name = "描述", Description = "描述")]
  51. [DataType(DataType.MultilineText)]
  52. public string Description { get; set; }
  53. }
  54. }