CostCalculationItem/IRaCIS.Core.Application/ViewModels/Management/SysUserViewModel.cs

175 lines
5.2 KiB
C#

using System;
using System.Collections.Generic;
using IRaCIS.Common.Model;
using Newtonsoft.Json;
namespace IRaCIS.Application.ViewModels
{
public class UserLoginDTO
{
public string UserName { get; set; }
public string Password { get; set; }
}
public class LoginReturnDTO
{
public UserBasicInfo BasicInfo { get; set; } = new UserBasicInfo();
public string JWTStr { get; set; }
public List<MenuFuncTreeNodeView> MenuTree = new List<MenuFuncTreeNodeView>();
//public List<FunctionTreeNodeView> FuncTree = new List<FunctionTreeNodeView>();
public Dictionary<string, List<string>> FuncDictionary=new Dictionary<string, List<string>>();
}
public class UserBasicInfo
{
public Guid Id { get; set; }
public string UserName { get; set; }
public string RealName { get; set; }
public int Sex { get; set; } // 1-男 2-女
public bool IsAdmin { get; set; } = false;
}
public class MenuFuncTreeNodeView
{
[JsonIgnore]
public Guid Id { get; set; }
[JsonIgnore]
public Guid ParentId { get; set; } = Guid.Empty;
[JsonIgnore]
public int ShowOrder { get; set; }
public string routeName { get; set; } = string.Empty;
public string component { get; set; } = string.Empty;
public string redirect { get; set; } = string.Empty;
public string path { get; set; } = string.Empty;
public Meta meta { get; set; }
public bool hidden { get; set; }
public List<MenuFuncTreeNodeView> Childrens { get; set; }
}
public class Meta
{
public string MetaTitle { get; set; } = string.Empty;
public bool MetaBreadcrumb { get; set; } = false;
public string MetaIcon { get; set; } = string.Empty;
public string MetaActiveMenu { get; set; } = string.Empty;
}
public class FunctionTreeNodeDTO
{
[JsonIgnore]
public Guid Id { get; set; }
[JsonIgnore]
public Guid ParentId { get; set; } = Guid.Empty;
[JsonIgnore]
public int ShowOrder { get; set; }
public string RouteName { get; set; } = string.Empty;
public string FunctionName { get; set; } = string.Empty;
public List<FunctionTreeNodeDTO> Childrens { get; set; }
}
public class UserDetailDTO : UserInfo
{
public string UserTypeName { get; set; }
}
public class UserInfo
{
public Guid Id { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string RealName { get; set; }
public int Sex { get; set; } // 1-男 2-女
public int Status { get; set; } = 1; // 0-已删除 1-正常
public string Phone { get; set; } = string.Empty;
public string EMail { get; set; } = string.Empty;
public Guid UserTypeId { get; set; } = Guid.Empty;
public string OrganizationName { get; set; } = string.Empty;
public Guid OrganizationId { get; set; }
public string Code { get; set; }
public bool IsZhiZhun { get; set; }
public string UserType { get; set; }
public Guid OrganizationTypeId { get; set; } = Guid.Empty;
public string OrganizationType { get; set; } = String.Empty;
public string DepartmentName { get; set; } = String.Empty;
public string PositionName { get; set; } = String.Empty;
}
/// <summary>
/// 添加用户是的返回模型
/// </summary>
public class UserAddedReturnDTO
{
public Guid Id { get; set; }
public string Code { get; set; }
}
//public class ResumePermission
//{
// public bool ReviewPermission { get; set; }
// public bool EditPermission { get; set; }
// public bool ShowSow { get; set; }
//}
public class UserCommand : UserInfo
{
}
public class EditPasswordCommand
{
public Guid UserId { get; set; }
public string NewPassWord { get; set; }
public string OldPassWord { get; set; }
}
public class UserListQueryDTO : PageInput
{
public string UserName { get; set; } = string.Empty;
public string Phone { get; set; } = string.Empty;
public string OrganizationName { get; set; } = string.Empty;
public Guid? UserType { get; set; } = Guid.Empty;
public int? UserState { get; set; }
}
public class UserRoleInfoDTO
{
public List<string> RoleList { get; set; } = new List<string>();
public int MaxPrivilegeLevel { get; set; }
}
public class UserListDTO : UserInfo
{
public string UserTypeName { get; set; }
public IEnumerable<RoleDTO> RoleNameList { get; set; } = new List<RoleDTO>();
}
public class UserIdRoleName : RoleDTO
{
public Guid UserId { get; set; }
}
public class UserIdRoleNameList
{
public Guid UserId { get; set; }
public IEnumerable<RoleDTO> RoleList { get; set; }
}
public class ResetPasswordCommand
{
public string EmailOrPhone { get; set; }
public int VerificationType { get; set; }
public string VerificationCode { get; set; }
public string NewPwd { get; set; }
}
}