Files
wcs/货架标准上位机/ViewModels/UserInfoViewModel.cs
hehaibing-1996 e89b64ea3a !提交代码
2024-04-15 18:43:28 +08:00

45 lines
1.3 KiB
C#

using Ping9719.WpfEx.Mvvm;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WCS.Model.ApiModel;
namespace
{
public class UserInfoViewModel : BindableBase
{
private bool isLogin = false;
/// <summary>
/// 是否登录
/// </summary>
public bool IsLogin { get => isLogin; set { SetProperty(ref isLogin, value); } }
private string LoginName_;
/// <summary>
/// 登录名
/// </summary>
public string LoginName { get => LoginName_; set { SetProperty(ref LoginName_, value); } }
private object Auth_;
/// <summary>
/// 权限变化通知
/// </summary>
public object Auth { get => Auth_; set { SetProperty(ref Auth_, value); } }
private UserModel User_;
/// <summary>
/// 用户
/// </summary>
public UserModel User { get => User_; set { SetProperty(ref User_, value); LoginName = value?.LoginName ?? null; } }
private List<RoleModel> Roles_;
/// <summary>
/// 角色
/// </summary>
public List<RoleModel> Roles { get => Roles_; set { SetProperty(ref Roles_, value); Auth = new object(); } }
}
}