chore: 格式化文档更新配置文件
This commit is contained in:
parent
24fe9e7d35
commit
e14b053c72
|
@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// 字典配置项
|
||||
/// </summary>
|
||||
[Table("Dicts")]
|
||||
public class Dict
|
||||
{
|
||||
/// <summary>
|
||||
/// 获得/设置 字典主键 数据库自增列
|
||||
/// </summary>
|
||||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 字典标签
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[Display(Name = "字典标签")]
|
||||
public string? Category { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 字典名称
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[Display(Name = "字典名称")]
|
||||
[NotNull]
|
||||
public string? Name { get; set; }
|
||||
|
@ -34,7 +25,6 @@ public class Dict
|
|||
/// <summary>
|
||||
/// 获得/设置 字典字典值
|
||||
/// </summary>
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[Display(Name = "字典代码")]
|
||||
[NotNull]
|
||||
public string? Code { get; set; }
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -11,9 +11,6 @@ public class User
|
|||
/// 获得/设置 系统登录用户名
|
||||
/// </summary>
|
||||
[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
|
|||
/// 获得/设置 用户显示名称
|
||||
/// </summary>
|
||||
[Display(Name = "显示名称")]
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[MaxLength(20, ErrorMessage = "{0}不能超过 20 个字符")]
|
||||
[NotNull]
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
|
@ -49,113 +44,9 @@ public class User
|
|||
/// </summary>
|
||||
public string? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取/设置 密码
|
||||
/// </summary>
|
||||
[Display(Name = "密码")]
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[MaxLength(16, ErrorMessage = "{0}不能超过 16 个字符")]
|
||||
[NotNull]
|
||||
public string? Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取/设置 密码盐
|
||||
/// </summary>
|
||||
public string? PassSalt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 用户注册时间
|
||||
/// </summary>
|
||||
[Display(Name = "注册时间")]
|
||||
public DateTime RegisterTime { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 用户被批复时间
|
||||
/// </summary>
|
||||
[Display(Name = "授权时间")]
|
||||
public DateTime? ApprovedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 用户批复人
|
||||
/// </summary>
|
||||
[Display(Name = "授权人")]
|
||||
public string? ApprovedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 用户的申请理由
|
||||
/// </summary>
|
||||
[Display(Name = "说明")]
|
||||
[NotNull]
|
||||
public string? Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 通知描述 2分钟内为刚刚
|
||||
/// </summary>
|
||||
public string? Period { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 新密码
|
||||
/// </summary>
|
||||
[Display(Name = "新密码")]
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[MaxLength(16, ErrorMessage = "{0}不能超过 16 个字符")]
|
||||
[NotNull]
|
||||
public string? NewPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 新密码
|
||||
/// </summary>
|
||||
[Display(Name = "确认密码")]
|
||||
[Required(ErrorMessage = "{0}不可为空")]
|
||||
[Compare("NewPassword", ErrorMessage = "{0}与{1}不一致")]
|
||||
[MaxLength(16, ErrorMessage = "{0}不能超过 16 个字符")]
|
||||
[NotNull]
|
||||
public string? ConfirmPassword { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 是否重置密码
|
||||
/// </summary>
|
||||
public int IsReset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获得/设置 默认格式为 DisplayName (UserName)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override string ToString() => $"{DisplayName} ({UserName})";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用户状态枚举类型
|
||||
/// </summary>
|
||||
public enum UserStates
|
||||
{
|
||||
/// <summary>
|
||||
/// 更改密码
|
||||
/// </summary>
|
||||
ChangePassword,
|
||||
|
||||
/// <summary>
|
||||
/// 更改样式
|
||||
/// </summary>
|
||||
ChangeTheme,
|
||||
|
||||
/// <summary>
|
||||
/// 更改显示名称
|
||||
/// </summary>
|
||||
ChangeDisplayName,
|
||||
|
||||
/// <summary>
|
||||
/// 审批用户
|
||||
/// </summary>
|
||||
ApproveUser,
|
||||
|
||||
/// <summary>
|
||||
/// 拒绝用户
|
||||
/// </summary>
|
||||
RejectUser,
|
||||
|
||||
/// <summary>
|
||||
/// 保存默认应用
|
||||
/// </summary>
|
||||
SaveApp
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
},
|
||||
"AppId": "Demo",
|
||||
"SimulateUserName": "",
|
||||
"SimulateUserName": "Admin",
|
||||
"BootstrapAdminAuthenticationOptions": {
|
||||
"AuthHost": "http://localhost:5210",
|
||||
"KeyPath": "..\\..\\keys"
|
||||
|
|
Loading…
Reference in New Issue