RoleEntity.cs 944 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using FreeSql.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.Collections.Generic;
  5. namespace Admin.Core.Model.Admin
  6. {
  7. /// <summary>
  8. /// 角色
  9. /// </summary>
  10. [Table(Name = "ad_role")]
  11. [Index("uk_role_name", "Name", true)]
  12. public class RoleEntity: EntityBase
  13. {
  14. /// <summary>
  15. /// 名称
  16. /// </summary>
  17. [MaxLength(50)]
  18. public string Name { get; set; }
  19. /// <summary>
  20. /// 说明
  21. /// </summary>
  22. [Column(DbType = "varchar(100)")]
  23. public string Description { get; set; }
  24. /// <summary>
  25. /// 启用
  26. /// </summary>
  27. public bool Enabled { get; set; } = true;
  28. /// <summary>
  29. /// 排序
  30. /// </summary>
  31. public int Sort { get; set; }
  32. [Navigate(ManyToMany = typeof(UserRoleEntity))]
  33. public virtual ICollection<UserEntity> Users { get; set; }
  34. }
  35. }