using System; using Infrastructure; using OpenAuth.Domain; using System.Collections.Generic; namespace OpenAuth.App.ViewModel { public class ModuleView { /// /// ID /// /// public Guid Id { get; set; } /// /// 组织名称 /// /// public string Name { get; set; } /// /// 主页面URL /// /// public string Url { get; set; } /// /// 父节点流水号 /// /// public Guid? ParentId { get; set; } /// /// 节点图标文件名称 /// /// public string IconName { get; set; } public bool Checked { get; set; } /// /// 模块中的元素 /// public List Elements = new List(); public static implicit operator ModuleView(Module module) { return module.MapTo(); } public static implicit operator Module(ModuleView view) { return view.MapTo(); } } }