SysRoleUser.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using Furion.DatabaseAccessor;
  2. using Microsoft.EntityFrameworkCore;
  3. using System.ComponentModel.DataAnnotations;
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace YBEE.EQM.Core
  6. {
  7. /// <summary>
  8. /// 角色用户
  9. /// </summary>
  10. [Comment("角色用户")]
  11. public partial class SysRoleUser : IEntity
  12. {
  13. /// <summary>
  14. /// 主键
  15. /// </summary>
  16. [Comment("主键")]
  17. [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  18. public int Id { get; set; }
  19. /// <summary>
  20. /// 角色ID
  21. /// </summary>
  22. [Comment("角色ID")]
  23. [Required]
  24. public int SysRoleId { get; set; }
  25. /// <summary>
  26. /// 用户ID
  27. /// </summary>
  28. [Comment("用户ID")]
  29. [Required]
  30. public int SysUserId { get; set; }
  31. /// <summary>
  32. /// 一对一引用(角色)
  33. /// </summary>
  34. public virtual SysRole SysRole { get; set; }
  35. /// <summary>
  36. /// 一对一引用(用户)
  37. /// </summary>
  38. public virtual SysUser SysUser { get; set; }
  39. }
  40. }