You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
120 lines
3.6 KiB
120 lines
3.6 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace SpaAspNetCore.Models
|
|
{
|
|
// Модели, возвращаемые действиями AccountController.
|
|
public class ExternalLoginConfirmationViewModel
|
|
{
|
|
[Required]
|
|
[Display(Name = "Адрес электронной почты")]
|
|
public string Email { get; set; }
|
|
|
|
[Display(Name = "Место рождения")]
|
|
public string Hometown { get; set; }
|
|
}
|
|
|
|
public class ExternalLoginListViewModel
|
|
{
|
|
public string ReturnUrl { get; set; }
|
|
}
|
|
|
|
public class SendCodeViewModel
|
|
{
|
|
public string SelectedProvider { get; set; }
|
|
public ICollection<System.Web.Mvc.SelectListItem> Providers { get; set; }
|
|
public string ReturnUrl { get; set; }
|
|
public bool RememberMe { get; set; }
|
|
}
|
|
|
|
public class VerifyCodeViewModel
|
|
{
|
|
[Required]
|
|
public string Provider { get; set; }
|
|
|
|
[Required]
|
|
[Display(Name = "Код")]
|
|
public string Code { get; set; }
|
|
public string ReturnUrl { get; set; }
|
|
|
|
[Display(Name = "Запомнить браузер?")]
|
|
public bool RememberBrowser { get; set; }
|
|
|
|
public bool RememberMe { get; set; }
|
|
}
|
|
|
|
public class ForgotViewModel
|
|
{
|
|
[Required]
|
|
[Display(Name = "Почта")]
|
|
public string Email { get; set; }
|
|
}
|
|
|
|
public class LoginViewModel
|
|
{
|
|
[Required]
|
|
[Display(Name = "Адрес электронной почты")]
|
|
[EmailAddress]
|
|
public string Email { get; set; }
|
|
|
|
[Required]
|
|
[DataType(DataType.Password)]
|
|
[Display(Name = "Password")]
|
|
public string Password { get; set; }
|
|
|
|
[Display(Name = "Запомнить меня")]
|
|
public bool RememberMe { get; set; }
|
|
}
|
|
|
|
public class RegisterViewModel
|
|
{
|
|
[Required]
|
|
[EmailAddress]
|
|
[Display(Name = "Адрес электронной почты")]
|
|
public string Email { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(100, ErrorMessage = "Значение {0} должно содержать символов не менее: {2}.", MinimumLength = 6)]
|
|
[DataType(DataType.Password)]
|
|
[Display(Name = "Пароль")]
|
|
public string Password { get; set; }
|
|
|
|
[DataType(DataType.Password)]
|
|
[Display(Name = "Подтверждение пароля")]
|
|
[Compare("Password", ErrorMessage = "Пароль и его подтверждение не совпадают.")]
|
|
public string ConfirmPassword { get; set; }
|
|
|
|
[Display(Name = "Место рождения")]
|
|
public string Hometown { get; set; }
|
|
}
|
|
|
|
public class ResetPasswordViewModel
|
|
{
|
|
[Required]
|
|
[EmailAddress]
|
|
[Display(Name = "Адрес электронной почты")]
|
|
public string Email { get; set; }
|
|
|
|
[Required]
|
|
[StringLength(100, ErrorMessage = "Значение {0} должно содержать символов не менее: {2}.", MinimumLength = 6)]
|
|
[DataType(DataType.Password)]
|
|
[Display(Name = "Пароль")]
|
|
public string Password { get; set; }
|
|
|
|
[DataType(DataType.Password)]
|
|
[Display(Name = "Подтверждение пароля")]
|
|
[Compare("Password", ErrorMessage = "Пароль и его подтверждение не совпадают.")]
|
|
public string ConfirmPassword { get; set; }
|
|
|
|
public string Code { get; set; }
|
|
}
|
|
|
|
public class ForgotPasswordViewModel
|
|
{
|
|
[Required]
|
|
[EmailAddress]
|
|
[Display(Name = "Адрес электронной почты")]
|
|
public string Email { get; set; }
|
|
}
|
|
}
|
|
|