mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
26 lines
724 B
C#
26 lines
724 B
C#
using System;
|
|
|
|
namespace OpenAuth.Domain
|
|
{
|
|
public partial class User
|
|
{
|
|
public string UserId { get; set; }
|
|
public string Account { get; set; }
|
|
public string Password { get; set; }
|
|
public string RealName { get; set; }
|
|
public string RoleId { get; set; }
|
|
public bool Enabled { get; set; }
|
|
public bool DeleteMark { get; set; }
|
|
|
|
public void CheckLogin(string password)
|
|
{
|
|
if(this.Password != password)
|
|
throw new Exception("密码错误");
|
|
if(!this.Enabled)
|
|
throw new Exception("用户已经被停用");
|
|
if (DeleteMark)
|
|
throw new Exception("该账号已经被删除");
|
|
}
|
|
}
|
|
}
|