using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using Microsoft.AspNet.Identity; using Microsoft.Owin.Security; namespace Chruch.Net.Models { public class IndexViewModel { public bool HasPassword { get; set; } public IList Logins { get; set; } public string PhoneNumber { get; set; } public bool TwoFactor { get; set; } public bool BrowserRemembered { get; set; } } public class ManageLoginsViewModel { public IList CurrentLogins { get; set; } public IList OtherLogins { get; set; } } public class FactorViewModel { public string Purpose { get; set; } } public class SetPasswordViewModel { [Required] [StringLength(100, ErrorMessage = "{0} 的長度至少必須為 {2} 個字元。", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "新密碼")] public string NewPassword { get; set; } [DataType(DataType.Password)] [Display(Name = "確認新密碼")] [Compare("NewPassword", ErrorMessage = "新密碼與確認密碼不相符。")] public string ConfirmPassword { get; set; } } public class ChangePasswordViewModel { [Required] [DataType(DataType.Password)] [Display(Name = "目前密碼")] public string OldPassword { get; set; } [Required] [StringLength(100, ErrorMessage = "{0} 的長度至少必須為 {2} 個字元。", MinimumLength = 6)] [DataType(DataType.Password)] [Display(Name = "新密碼")] public string NewPassword { get; set; } [DataType(DataType.Password)] [Display(Name = "確認新密碼")] [Compare("NewPassword", ErrorMessage = "新密碼與確認密碼不相符。")] public string ConfirmPassword { get; set; } } public class AddPhoneNumberViewModel { [Required] [Phone] [Display(Name = "電話號碼")] public string Number { get; set; } } public class VerifyPhoneNumberViewModel { [Required] [Display(Name = "代碼")] public string Code { get; set; } [Required] [Phone] [Display(Name = "電話號碼")] public string PhoneNumber { get; set; } } public class ConfigureTwoFactorViewModel { public string SelectedProvider { get; set; } public ICollection Providers { get; set; } } }