SysFunctionBase.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. using Abp.Domain.Entities.Auditing;
  4. namespace IwbZero.Authorization.Base.SystemInfo
  5. {
  6. public class SysFunctionBase : FullAuditedEntity<int>
  7. {
  8. public const int FunctionNoMaxLength = 100;
  9. public const int FunctionNameMaxLength = 100;
  10. public const int PermissionNameMaxLength = 500;
  11. public const int FunctionPathMaxLength = 500;
  12. public const int ActionMaxLength = 50;
  13. public const int ControllerMaxLength = 50;
  14. public const int IconMaxLength = 50;
  15. public const int ClassMaxLength = 100;
  16. [MaxLength(FunctionNoMaxLength)]
  17. [Index]
  18. public string FunctionNo { get; set; }
  19. [MaxLength(FunctionNoMaxLength)]
  20. public string ParentNo { get; set; }
  21. [MaxLength(FunctionNameMaxLength)]
  22. public string FunctionName { get; set; }
  23. [MaxLength(PermissionNameMaxLength)]
  24. [Index(IsUnique = true)]
  25. public string PermissionName { get; set; }
  26. public int FunctionType { get; set; }
  27. //[MaxLength(FunctionPathMaxLength)]
  28. //public string FunctionPath { get; set; }
  29. [StringLength(ActionMaxLength)]
  30. public string Action { get; set; }
  31. [StringLength(ControllerMaxLength)]
  32. public string Controller { get; set; }
  33. public string Url { get; set; }
  34. [StringLength(IconMaxLength)]
  35. public string Icon { get; set; }
  36. [StringLength(ClassMaxLength)]
  37. public string Class { get; set; }
  38. public string Script { get; set; }
  39. public bool NeedAuth { get; set; }
  40. public int Sort { get; set; }
  41. public int Depth { get; set; }
  42. public bool? IsLeaf { get; set; }
  43. }
  44. }