Sitemap.cs 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.ComponentModel.DataAnnotations.Schema;
  6. namespace FMSAdmin.Entities {
  7. public enum SitemapType {
  8. 본사 = 0,
  9. 현장,
  10. 모바일
  11. }
  12. public class Sitemap {
  13. public Sitemap() {
  14. Childs = new List<Sitemap>();
  15. SitemapAuths = new List<SitemapAuth>();
  16. MobileShortcuts = new List<MobileShortcut>();
  17. }
  18. [DisplayName("ID"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  19. public int SitemapId { get; set; }
  20. [DisplayName("메뉴종류")]
  21. public SitemapType Type { get; set; }
  22. [DisplayName("메뉴명"), Required]
  23. public string Name { get; set; }
  24. [DisplayName("부모"), ForeignKey("ParentId")]
  25. public virtual Sitemap Parent { get; set; }
  26. [DisplayName("경로")]
  27. public string Path { get; set; }
  28. [DisplayName("아이콘")]
  29. public string Icon { get; set; }
  30. [DisplayName("기능1")]
  31. public string Action1 { get; set; }
  32. [DisplayName("기능2")]
  33. public string Action2 { get; set; }
  34. [DisplayName("기능3")]
  35. public string Action3 { get; set; }
  36. [DisplayName("기능4")]
  37. public string Action4 { get; set; }
  38. [DisplayName("기능5")]
  39. public string Action5 { get; set; }
  40. [DisplayName("뎁스")]
  41. public int Depth { get; set; }
  42. [DisplayName("포지션")]
  43. public int Position { get; set; }
  44. [DisplayName("숨김")]
  45. public bool Hidden { get; set; }
  46. [DisplayName("메모")]
  47. public string Memo { get; set; }
  48. [DisplayName("등록일")]
  49. public DateTime Created { get; set; }
  50. [DisplayName("수정일")]
  51. public DateTime Updated { get; set; }
  52. public int? ParentId { get; set; }
  53. [InverseProperty(nameof(Sitemap.Parent))]
  54. public virtual ICollection<Sitemap> Childs { get; set; }
  55. [InverseProperty(nameof(SitemapAuth.Sitemap))]
  56. public virtual ICollection<SitemapAuth> SitemapAuths { get; set; }
  57. [InverseProperty(nameof(MobileShortcut.Sitemap))]
  58. public virtual ICollection<MobileShortcut> MobileShortcuts { get; set; }
  59. }
  60. }