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

namespace Ewide.Core
{
    /// <summary>
    /// 角色数据范围表
    /// </summary>
    [Table("sys_role_data_scope")]
    [Comment("角色数据范围表")]
    public class SysRoleDataScope : IEntity
    {
        /// <summary>
        /// 角色Id
        /// </summary>
        [Comment("角色Id")]
        [Column("SysRoleId", TypeName = "varchar(36)")]
        public string SysRoleId { get; set; }

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

        /// <summary>
        /// 机构Id
        /// </summary>
        [Comment("机构Id")]
        [Column("SysOrgId", TypeName = "varchar(36)")]
        public string SysOrgId { get; set; }

        /// <summary>
        /// 一对一引用（系统机构）
        /// </summary>
        [XmlIgnore]
        public SysOrg SysOrg { get; set; }
    }
}
