using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace YBEE.EQM.Core
{
    /// <summary>
    /// 角色用户
    /// </summary>
    [Comment("角色用户")]
    public partial class SysRoleUser : IEntity
    {
        /// <summary>
        /// 主键
        /// </summary>
        [Comment("主键")]
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }

        /// <summary>
        /// 角色ID
        /// </summary>
        [Comment("角色ID")]
        [Required]
        public int SysRoleId { get; set; }

        /// <summary>
        /// 用户ID
        /// </summary>
        [Comment("用户ID")]
        [Required]
        public int SysUserId { get; set; }


        /// <summary>
        /// 一对一引用（角色）
        /// </summary>
        public virtual SysRole SysRole { get; set; }

        /// <summary>
        /// 一对一引用（用户）
        /// </summary>
        public virtual SysUser SysUser { get; set; }
    }
}