日期:2014-05-17 浏览次数:20416 次
public class User
{
[Key]
[StringLength(50)]
[DisplayName("用户编号")]
public string UserCd { get; set; }
/// <summary>
/// role表中的主键,角色编号
/// </summary>
//[Required(ErrorMessage="用户角色不能为空")]
//public int RoleId { get; set; }
/// <summary>
/// 部门编号
/// </summary>
//[Required(ErrorMessage = "部门不能为空")]
//public int GroupId { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Required(ErrorMessage = "姓名不能为空")]
[StringLength(50)]
public string UserName { get; set; }
/// <summary>
/// 身份证
/// </summary>
[Required(ErrorMessage = "身份证不能空")]
[StringLength(50)]
public string UserIdCode { get; set; }
/// <summary>
/// false-女,true-男
/// </summary>
[Required(ErrorMessage = "用户性别")]
[DefaultValue(false)]
public bool UserSex { get; set; }
[Required(ErrorMessage = "用户密码不能为空")]
[StringLength(50, MinimumLength = 6)]
[DataType(DataType.Password)]
public string UserPassword { get; set; }
/// <summary>
/// 用户照片
/// </summary>
public string UserPic { get; set; }
/// <summary>
/// 用户最后一次登录时间