SysFunction.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System.ComponentModel.DataAnnotations;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. using Abp.MultiTenancy;
  4. namespace VberZero.BaseSystem;
  5. [Table("Sys_Functions")]
  6. public class SysFunction : TreeEntity<int?, SysFunction>
  7. {
  8. public const int NameMaxLength = 50;
  9. public const int DisplayNameMaxLength = 100;
  10. public const int PermissionNameMaxLength = 500;
  11. public const int UrlMaxLength = 1000;
  12. public const int IconMaxLength = 50;
  13. public const int ScriptMaxLength = 100;
  14. public const int ClassMaxLength = 100;
  15. public SysFunction()
  16. {
  17. MultiTenancySides = MultiTenancySides.Tenant;
  18. }
  19. [MaxLength(NameMaxLength)]
  20. public string Name { get; set; }
  21. [MaxLength(DisplayNameMaxLength)]
  22. public string DisplayName { get; set; }
  23. [MaxLength(PermissionNameMaxLength)]
  24. public string PermissionName { get; set; }
  25. public VzDefinition.FunctionType FunctionType { get; set; }
  26. [StringLength(UrlMaxLength)]
  27. public string Url { get; set; }
  28. [StringLength(IconMaxLength)]
  29. public string Icon { get; set; }
  30. [StringLength(ScriptMaxLength)]
  31. public string Script { get; set; }
  32. [StringLength(ClassMaxLength)]
  33. public string Class { get; set; }
  34. public bool NeedAuth { get; set; }
  35. public MultiTenancySides MultiTenancySides { get; set; }
  36. }