mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-09-19 10:08:04 +08:00
完成用户模块/用户角色分配
This commit is contained in:
64
OpenAuth.App/ViewModel/RoleVM.cs
Normal file
64
OpenAuth.App/ViewModel/RoleVM.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : OpenAuth.App
|
||||
// Author : yubaolee
|
||||
// Created : 11-29-2015
|
||||
//
|
||||
// Last Modified By : yubaolee
|
||||
// Last Modified On : 11-29-2015
|
||||
// ***********************************************************************
|
||||
// <copyright file="RoleVM.cs" company="www.cnblogs.com/yubaolee">
|
||||
// Copyright (c) www.cnblogs.com/yubaolee. All rights reserved.
|
||||
// </copyright>
|
||||
// <summary>角色模型视图</summary>
|
||||
// ***********************************************************************
|
||||
|
||||
using System;
|
||||
using Infrastructure;
|
||||
using OpenAuth.Domain;
|
||||
|
||||
namespace OpenAuth.App.ViewModel
|
||||
{
|
||||
public partial class RoleVM
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 所属部门节点语义ID
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string OrgCascadeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属部门名称
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string OrgName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///是否属于某用户
|
||||
/// </summary>
|
||||
public bool IsBelongUser { get; set; }
|
||||
|
||||
public static implicit operator RoleVM(Role role)
|
||||
{
|
||||
return AutoMapperExt.ConvertTo<Role,RoleVM>(role);
|
||||
}
|
||||
|
||||
public static implicit operator Role(RoleVM rolevm)
|
||||
{
|
||||
return AutoMapperExt.ConvertTo<RoleVM, Role>(rolevm);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user