diff --git a/src/blazor/client/BootstrapClient.Web.Models/Dict.cs b/src/blazor/client/BootstrapClient.Web.Models/Dict.cs
index 4c2f8f80..acada53a 100644
--- a/src/blazor/client/BootstrapClient.Web.Models/Dict.cs
+++ b/src/blazor/client/BootstrapClient.Web.Models/Dict.cs
@@ -1,32 +1,23 @@
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
namespace BootstrapClient.DataAccess.Models;
///
/// 字典配置项
///
-[Table("Dicts")]
public class Dict
{
- ///
- /// 获得/设置 字典主键 数据库自增列
- ///
- public string? Id { get; set; }
-
///
/// 获得/设置 字典标签
///
- [Required(ErrorMessage = "{0}不可为空")]
[Display(Name = "字典标签")]
public string? Category { get; set; }
///
/// 获得/设置 字典名称
///
- [Required(ErrorMessage = "{0}不可为空")]
[Display(Name = "字典名称")]
[NotNull]
public string? Name { get; set; }
@@ -34,7 +25,6 @@ public class Dict
///
/// 获得/设置 字典字典值
///
- [Required(ErrorMessage = "{0}不可为空")]
[Display(Name = "字典代码")]
[NotNull]
public string? Code { get; set; }
diff --git a/src/blazor/client/BootstrapClient.Web.Models/Navigation.cs b/src/blazor/client/BootstrapClient.Web.Models/Navigation.cs
index e3f25819..58a306c0 100644
--- a/src/blazor/client/BootstrapClient.Web.Models/Navigation.cs
+++ b/src/blazor/client/BootstrapClient.Web.Models/Navigation.cs
@@ -1,7 +1,6 @@
// Copyright (c) Argo Zhang (argo@163.com). All rights reserved.
using System.ComponentModel.DataAnnotations;
-using System.ComponentModel.DataAnnotations.Schema;
namespace BootstrapClient.DataAccess.Models;
diff --git a/src/blazor/client/BootstrapClient.Web.Models/User.cs b/src/blazor/client/BootstrapClient.Web.Models/User.cs
index 93dd08ed..ace245eb 100644
--- a/src/blazor/client/BootstrapClient.Web.Models/User.cs
+++ b/src/blazor/client/BootstrapClient.Web.Models/User.cs
@@ -11,9 +11,6 @@ public class User
/// 获得/设置 系统登录用户名
///
[Display(Name = "登录名称")]
- [Required(ErrorMessage = "{0}不可为空")]
- [RegularExpression("^[a-zA-Z0-9_@.]*$", ErrorMessage = "登录名称包含非法字符")]
- [MaxLength(16, ErrorMessage = "{0}不能超过 16 个字符")]
[NotNull]
public string? UserName { get; set; }
@@ -21,8 +18,6 @@ public class User
/// 获得/设置 用户显示名称
///
[Display(Name = "显示名称")]
- [Required(ErrorMessage = "{0}不可为空")]
- [MaxLength(20, ErrorMessage = "{0}不能超过 20 个字符")]
[NotNull]
public string? DisplayName { get; set; }
@@ -49,113 +44,9 @@ public class User
///
public string? Id { get; set; }
- ///
- /// 获取/设置 密码
- ///
- [Display(Name = "密码")]
- [Required(ErrorMessage = "{0}不可为空")]
- [MaxLength(16, ErrorMessage = "{0}不能超过 16 个字符")]
- [NotNull]
- public string? Password { get; set; }
-
- ///
- /// 获取/设置 密码盐
- ///
- public string? PassSalt { get; set; }
-
- ///
- /// 获得/设置 用户注册时间
- ///
- [Display(Name = "注册时间")]
- public DateTime RegisterTime { get; set; } = DateTime.Now;
-
- ///
- /// 获得/设置 用户被批复时间
- ///
- [Display(Name = "授权时间")]
- public DateTime? ApprovedTime { get; set; }
-
- ///
- /// 获得/设置 用户批复人
- ///
- [Display(Name = "授权人")]
- public string? ApprovedBy { get; set; }
-
- ///
- /// 获得/设置 用户的申请理由
- ///
- [Display(Name = "说明")]
- [NotNull]
- public string? Description { get; set; }
-
- ///
- /// 获得/设置 通知描述 2分钟内为刚刚
- ///
- public string? Period { get; set; }
-
- ///
- /// 获得/设置 新密码
- ///
- [Display(Name = "新密码")]
- [Required(ErrorMessage = "{0}不可为空")]
- [MaxLength(16, ErrorMessage = "{0}不能超过 16 个字符")]
- [NotNull]
- public string? NewPassword { get; set; }
-
- ///
- /// 获得/设置 新密码
- ///
- [Display(Name = "确认密码")]
- [Required(ErrorMessage = "{0}不可为空")]
- [Compare("NewPassword", ErrorMessage = "{0}与{1}不一致")]
- [MaxLength(16, ErrorMessage = "{0}不能超过 16 个字符")]
- [NotNull]
- public string? ConfirmPassword { get; set; }
-
- ///
- /// 获得/设置 是否重置密码
- ///
- public int IsReset { get; set; }
-
///
/// 获得/设置 默认格式为 DisplayName (UserName)
///
///
public override string ToString() => $"{DisplayName} ({UserName})";
}
-
-///
-/// 用户状态枚举类型
-///
-public enum UserStates
-{
- ///
- /// 更改密码
- ///
- ChangePassword,
-
- ///
- /// 更改样式
- ///
- ChangeTheme,
-
- ///
- /// 更改显示名称
- ///
- ChangeDisplayName,
-
- ///
- /// 审批用户
- ///
- ApproveUser,
-
- ///
- /// 拒绝用户
- ///
- RejectUser,
-
- ///
- /// 保存默认应用
- ///
- SaveApp
-}
diff --git a/src/blazor/client/BootstrapClient.Web/appsettings.Development.json b/src/blazor/client/BootstrapClient.Web/appsettings.Development.json
index 6b8a9282..f1e3471f 100644
--- a/src/blazor/client/BootstrapClient.Web/appsettings.Development.json
+++ b/src/blazor/client/BootstrapClient.Web/appsettings.Development.json
@@ -8,7 +8,7 @@
}
},
"AppId": "Demo",
- "SimulateUserName": "",
+ "SimulateUserName": "Admin",
"BootstrapAdminAuthenticationOptions": {
"AuthHost": "http://localhost:5210",
"KeyPath": "..\\..\\keys"