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

namespace Ewide.Core
{
    /// <summary>
    /// 用户角色表
    /// </summary>
    [Table("sys_user_role")]
    [Comment("用户角色表")]
    public class SysUserRole : IEntity
    {
        /// <summary>
        /// 用户Id
        /// </summary>
        [Comment("用户Id")]
        [Column("SysUserId", TypeName = "varchar(36)")]
        public string SysUserId { get; set; }

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

        /// <summary>
        /// 系统角色Id
        /// </summary>
        [Comment("角色Id")]
        [Column("SysRoleId", TypeName = "varchar(36)")]
        public string SysRoleId { get; set; }

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