using Prism.Mvvm;
using System.ComponentModel.DataAnnotations;
namespace PLCSharp.VVMs.Authority
{
///
/// 用户
///
public class User : BindableBase
{
///
/// 用户
///
public User() { }
///
/// 用户
///
public User(string name, string password, Authority authority)
{
Name = name;
Password = password;
Authority = authority;
}
private string _Name;
///
/// 名称
///
[Key]
public string Name
{
get { return _Name; }
set { SetProperty(ref _Name, value); }
}
///
/// 密码
///
public string Password { get; set; }
private Authority _Authority;
///
/// 权限
///
public Authority Authority
{
get { return _Authority; }
set { SetProperty(ref _Authority, value); }
}
///
/// ToString
///
/// 返回字符串
public override string ToString()
{
return $"{Name}";
}
}
}