更改null操作

This commit is contained in:
橙子
2023-01-05 20:32:58 +08:00
parent efbf799218
commit b7c9b84449
25 changed files with 71 additions and 76 deletions

View File

@@ -8,7 +8,7 @@ namespace Yi.Framework.DtoModel.Base.Dto
{
public class GiveUserSetRoleDto
{
public List<long> UserIds { get; set; }
public List<long> RoleIds { get; set; }
public List<long>? UserIds { get; set; }
public List<long>? RoleIds { get; set; }
}
}

View File

@@ -8,11 +8,11 @@ namespace Yi.Framework.DtoModel.Base.Dto
{
public class LoginDto
{
public string UserName { get; set; }
public string Password { get; set; }
public string UserName { get; set; }=string.Empty;
public string Password { get; set; } = string.Empty;
public string Uuid { get; set; }
public string? Uuid { get; set; }
public string Code { get; set; }
public string? Code { get; set; }
}
}

View File

@@ -8,9 +8,9 @@ namespace Yi.Framework.DtoModel.Base.Dto
{
public class RegisterDto
{
public string UserName { get; set; }
public string Password { get; set; }
public string UserName { get; set; } = string.Empty;
public string Password { get; set; } = string.Empty;
public string Name { get; set; }
public string Name { get; set; } = string.Empty;
}
}

View File

@@ -9,9 +9,9 @@ namespace Yi.Framework.DtoModel.Base.Dto
{
public class UserInfoDto
{
public UserEntity User { get; set; }
public List<long> RoleIds { get; set; }
public List<long> PostIds { get; set; }
public UserEntity? User { get; set; }
public List<long>? RoleIds { get; set; }
public List<long>? PostIds { get; set; }
public long? DeptId { get; set; }
}
}

View File

@@ -10,9 +10,9 @@ namespace Yi.Framework.DtoModel.Base.Vo
{
public long Id { get; set; }
public string Title { get; set; }
public string Title { get; set; } = string.Empty;
public string Content { get; set; }
public string Content { get; set; } = string.Empty;
public long? UserId { get; set; }
@@ -30,10 +30,10 @@ namespace Yi.Framework.DtoModel.Base.Vo
public int? OrderNum { get; set; }
public string Remark { get; set; }
public List<string> Images { get; set; }
public string? Remark { get; set; }
public List<string>? Images { get; set; }
public int? AgreeNum { get; set; }
public UserVo User { get; set; }
public UserVo? User { get; set; }
}
}

View File

@@ -14,7 +14,7 @@ namespace Yi.Framework.DtoModel.Base.Vo
/// <summary>
/// 评论内容
///</summary>
public string Content { get; set; }
public string Content { get; set; }=string.Empty;
/// <summary>
/// 点赞数
///</summary>
@@ -41,7 +41,7 @@ namespace Yi.Framework.DtoModel.Base.Vo
/// 描述
///</summary>
public string Remark { get; set; }
public string? Remark { get; set; }
/// <summary>
/// 子评论数
///</summary>
@@ -51,11 +51,11 @@ namespace Yi.Framework.DtoModel.Base.Vo
/// <summary>
/// 被回复的用户信息
///</summary>
public UserVo UserInfo { get; set; }
public UserVo? UserInfo { get; set; }
/// <summary>
/// 创建评论的用户信息
///</summary>
public UserVo CreateUserInfo { get; set; }
public UserVo? CreateUserInfo { get; set; }
}
}

View File

@@ -11,15 +11,15 @@ namespace Yi.Framework.DtoModel.Base.Vo
/// </summary>
public class UserVo
{
public string Name { get; set; }
public string? Name { get; set; }
public int? Age { get; set; }
public string UserName { get; set; }
public string? UserName { get; set; }
public string Icon { get; set; }
public string? Icon { get; set; }
public string Nick { get; set; }
public string? Nick { get; set; }
//public string Email { get; set; }
@@ -30,7 +30,7 @@ namespace Yi.Framework.DtoModel.Base.Vo
//public string Phone { get; set; }
public string Introduction { get; set; }
public string? Introduction { get; set; }
public int? Sex { get; set; }
}