SysRoleView.cs 2.18 KB
// ***********************************************************************
// <summary>角色模型视图</summary>
// ***********************************************************************


using Hh.Mes.Common.Infrastructure;
using Hh.Mes.POJO.Entity;
using SqlSugar;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Hh.Mes.Pojo.System
{
    public partial class SysRoleView
    {
        /// <summary>
        /// Id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [Column("id")]
        public int Id { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [Column("createBy")]
        public string CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column("createTime")]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 更新者
        /// </summary>
        [Column("updateBy")]
        public string UpdateBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column("updateTime")]
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        /// <returns></returns>
        public string Name { get; set; }

        /// <summary>
        /// 当前状态
        /// </summary>
        public int Status { get; set; }
        /// <summary>
	    /// 角色类型
	    /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 所属组织名称,多个可用,分隔
        /// </summary>
        public string Organizations { get; set; }

        /// <summary>
        /// 所属组织ID,多个可用,分隔
        /// </summary>
        public string OrganizationIds { get; set; }

        /// <summary>
        ///是否属于某用户 
        /// </summary>
        public bool Checked { get; set; }

        public static implicit operator SysRoleView(SysRole role)
        {
            return role.MapTo<SysRoleView>();
        }

        public static implicit operator SysRole(SysRoleView rolevm)
        {
            return rolevm.MapTo<SysRole>();
        }



    }
}