119 lines
3.4 KiB
C#
119 lines
3.4 KiB
C#
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace Fab2ApprovalSystem.Models
|
|
{
|
|
public class LoginModel
|
|
{
|
|
[Key]
|
|
public int UserID { get; set; }
|
|
|
|
[Required]
|
|
[Display(Name = "Login ID")]
|
|
public string LoginID { get; set; }
|
|
|
|
//[Required]
|
|
[DataType(DataType.Password)]
|
|
[Display(Name = "Password")]
|
|
public string Password { get; set; }
|
|
|
|
public string FirstName { get; set; }
|
|
public string LastName { get; set; }
|
|
|
|
public string FullName { get; set; }
|
|
|
|
public bool IsAdmin { get; set; }
|
|
public bool IsManager { get; set; }
|
|
public bool IsActive { get; set; }
|
|
public DateTime? LastLogin { get; set; }
|
|
|
|
public bool OOO { get; set; }
|
|
|
|
public DateTime? OOOStartDate { get; set; }
|
|
public DateTime? OOOExpirationDate { get; set; }
|
|
|
|
public int DelegatedTo { get; set; }
|
|
|
|
public string Email { get; set; }
|
|
|
|
[Display(Name="Delegated To")]
|
|
public string DelegatedToFullName { get; set; }
|
|
|
|
[Display(Name = "OOO Action")]
|
|
public virtual string OOOStatusWithUserID
|
|
{
|
|
get
|
|
{
|
|
return UserID.ToString() + "~" + (OOO ? "1" : "0") + "~" + FullName;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
public class UserProfile
|
|
{
|
|
public int UserId { get; set; }
|
|
public string FullName { get; set; }
|
|
}
|
|
|
|
|
|
//public class ExternalLoginConfirmationViewModel
|
|
//{
|
|
// [Required]
|
|
// [Display(Name = "User name")]
|
|
// public string UserName { get; set; }
|
|
//}
|
|
|
|
//public class ManageUserViewModel
|
|
//{
|
|
// [Required]
|
|
// [DataType(DataType.Password)]
|
|
// [Display(Name = "Current password")]
|
|
// public string OldPassword { get; set; }
|
|
|
|
// [Required]
|
|
// [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
|
// [DataType(DataType.Password)]
|
|
// [Display(Name = "New password")]
|
|
// public string NewPassword { get; set; }
|
|
|
|
// [DataType(DataType.Password)]
|
|
// [Display(Name = "Confirm new password")]
|
|
// [Compare("NewPassword", ErrorMessage = "The new password and confirmation password do not match.")]
|
|
// public string ConfirmPassword { get; set; }
|
|
//}
|
|
|
|
//public class LoginViewModel
|
|
//{
|
|
// [Required]
|
|
// [Display(Name = "User name")]
|
|
// public string UserName { get; set; }
|
|
|
|
// [Required]
|
|
// [DataType(DataType.Password)]
|
|
// [Display(Name = "Password")]
|
|
// public string Password { get; set; }
|
|
|
|
// [Display(Name = "Remember me?")]
|
|
// public bool RememberMe { get; set; }
|
|
//}
|
|
|
|
//public class RegisterViewModel
|
|
//{
|
|
// [Required]
|
|
// [Display(Name = "User name")]
|
|
// public string UserName { get; set; }
|
|
|
|
// [Required]
|
|
// [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)]
|
|
// [DataType(DataType.Password)]
|
|
// [Display(Name = "Password")]
|
|
// public string Password { get; set; }
|
|
|
|
// [DataType(DataType.Password)]
|
|
// [Display(Name = "Confirm password")]
|
|
// [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
|
|
// public string ConfirmPassword { get; set; }
|
|
//}
|
|
}
|