• MVC第三波书店用户Model


    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Web;

    namespace BookShopSys.Plus.Models
    {
        public class UserInfo
        {
           
            public int Id { get; set; }
            //验证码
            public string CheckNo { get; set; }
            //记住我
            public string Removeme { get; set; }
            public string Name { get; set; }
            //账号
            [Required]
            public string AccountNum { get; set; }
            public DateTime AddTime { get; set; }
            [Required]
            [StringLength(100, ErrorMessage = "{0} 必须至少包含 {2} 个字符。", MinimumLength = 6)]
            [DataType(DataType.Password)]
            public string PassWord { get; set; }
            [Required]
            public string Phone { get; set; }
            [Required]
            [EmailAddress]
            public string Email { get; set; }
            [Required]
            public string Adderss { get; set; }
            public int Role { get; set; }
            [DataType(DataType.Password)]
            [Compare("PassWord", ErrorMessage = "密码和确认密码不匹配。")]
            public string ConfirmPassword { get; set; }
        }
    }

    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using Microsoft.AspNet.Identity;
    using Microsoft.Owin.Security;

    namespace BookShopSys.Plus.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 ICollectionMvc.SelectListItem> Providers { get; set; }
        }
    }

  • 相关阅读:
    java计算机毕业设计教评系统源码+mysql数据库+系统+lw文档+部署
    搭建Gogs 代码管理平台
    【踩坑记录】Elasticsearch查询:circuit_breaking_exception异常解决方案
    Django-(4)
    ue5创建地图瓦片
    LeetCode217——存在重复元素
    信息化项目风险控制与应用
    GEE开发之Modis_LST地表温度数据分析
    【网络原理】基本原理篇:I/O
    【实战技能】培训和指导:深入浅出原则
  • 原文地址:https://blog.csdn.net/m0_74456535/article/details/127936471