SysModuleView.cs 2.48 KB
using Hh.Mes.Common.Infrastructure;
using Hh.Mes.POJO.Entity;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace Hh.Mes.Pojo.System
{
    public class SysModuleView
    {
        /// <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>
        /// 父级Id
        /// </summary>
        [Column("ParentId")]
        public int? ParentId { get; set; }

        /// <summary>
        /// 父级名称
        /// </summary>
        [Column("ParentName")]
        public string ParentName { get; set; }

        /// <summary>
	    /// 分支Id
	    /// </summary>
        [Column("CascadeId")]
        public string CascadeId { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        [Column("name")]
        public string Name { get; set; }

        /// <summary>
        /// 主页面URL
        /// </summary>
        /// <returns></returns>
        public string Url { get; set; }

        /// <summary>
        /// 节点图标文件名称
        /// </summary>
        /// <returns></returns>
        public string IconName { get; set; }

        public bool Checked { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        public int SortNo { get; set; }

        public string Code { get; set; }

        public int IsShow { get; set; }


        /// <summary>
        /// 模块中的元素
        /// </summary>
        public List<SysModuleElement> Elements { get; set; }

        public static implicit operator SysModuleView(SysModule module)
        {
            return module.MapTo<SysModuleView>();
        }

        public static implicit operator SysModule(SysModuleView view)
        {
            return view.MapTo<SysModule>();
        }
    }
}