refactor: 格式化代码消除警告信息

This commit is contained in:
Argo-Tianyi 2022-01-05 03:46:04 +08:00
parent 7ce614554f
commit 09de55a641
2 changed files with 19 additions and 10 deletions

View File

@ -19,21 +19,23 @@ public class Dict
/// </summary>
[Required(ErrorMessage = "{0}不可为空")]
[Display(Name = "字典标签")]
public string Category { get; set; } = "";
public string? Category { get; set; }
/// <summary>
/// 获得/设置 字典名称
/// </summary>
[Required(ErrorMessage = "{0}不可为空")]
[Display(Name = "字典名称")]
public string Name { get; set; } = "";
[NotNull]
public string? Name { get; set; }
/// <summary>
/// 获得/设置 字典字典值
/// </summary>
[Required(ErrorMessage = "{0}不可为空")]
[Display(Name = "字典代码")]
public string Code { get; set; } = "";
[NotNull]
public string? Code { get; set; }
/// <summary>
/// 获得/设置 字典定义值 0 表示系统使用1 表示用户自定义 默认为 1

View File

@ -16,7 +16,8 @@ public class LoginLog
/// 获得/设置 用户名
/// </summary>
[DisplayName("登录名称")]
public string UserName { get; set; } = "";
[NotNull]
public string? UserName { get; set; }
/// <summary>
/// 获得/设置 登录时间
@ -28,35 +29,41 @@ public class LoginLog
/// 获得/设置 登录IP地址
/// </summary>
[DisplayName("主机")]
public string Ip { get; set; } = "";
[NotNull]
public string? Ip { get; set; }
/// <summary>
/// 获得/设置 登录浏览器
/// </summary>
[DisplayName("浏览器")]
public string Browser { get; set; } = "";
[NotNull]
public string? Browser { get; set; }
/// <summary>
/// 获得/设置 登录操作系统
/// </summary>
[DisplayName("操作系统")]
public string OS { get; set; } = "";
[NotNull]
public string? OS { get; set; }
/// <summary>
/// 获得/设置 登录地点
/// </summary>
[DisplayName("登录地点")]
public string City { get; set; } = "";
[NotNull]
public string? City { get; set; }
/// <summary>
/// 获得/设置 登录是否成功
/// </summary>
[DisplayName("登录结果")]
public string Result { get; set; } = "";
[NotNull]
public string? Result { get; set; }
/// <summary>
/// 获得/设置 用户 UserAgent
/// </summary>
[DisplayName("登录名称")]
public string UserAgent { get; set; } = "";
[NotNull]
public string? UserAgent { get; set; }
}