using System.ComponentModel.DataAnnotations;
using Infrastructure;
using OpenAuth.Repository.Domain;
namespace OpenAuth.App.Request
{
///
/// 添加或修改用户信息的请求
///
public class UpdateUserReq
{
///
/// 用户ID
///
///
public long Id { get; set; }
///
///
///
[Required(ErrorMessage = "账号肯定不能为空啊~~")]
public string Account { get; set; }
///
///
///
public string Password { get; set; }
///
/// 用户姓名
///
///
[Required(ErrorMessage="姓名不能为空")]
public string Name { get; set; }
///
///
///
public int Sex { get; set; }
///
/// 当前状态
///
///
public int Status { get; set; }
///
/// 头像
///
public string HeadIcon { get; set; }
public static implicit operator UpdateUserReq(SysUser user)
{
return user.MapTo();
}
public static implicit operator SysUser(UpdateUserReq view)
{
return view.MapTo();
}
public UpdateUserReq()
{
}
}
}