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

namespace YBEE.EQM.Core
{
    /// <summary>
    /// 角色菜单
    /// </summary>
    [Comment("角色菜单")]
    public partial class SysRoleMenu : 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 SysMenuId { get; set; }

        /// <summary>
        /// 数据范围类型
        /// </summary>
        [Comment("数据范围类型")]
        public DataScopeType DataScopeType { get; set; }

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

        /// <summary>
        /// 一对一引用（菜单）
        /// </summary>
        public virtual SysMenu SysMenu { get; set; }
    }
}