Skip to content

Commit

Permalink
更改类型为别名并支持可空类型
Browse files Browse the repository at this point in the history
将代码中的内置类型更改为对应的别名类型(如 `bool` 改为 `Boolean`,`string` 改为 `String` 等)。此外,将某些属性类型改为可空类型(如 `String?`, `Object?`, `T?`),以允许这些属性可以为 `null`。
  • Loading branch information
猿人易 committed Nov 23, 2024
1 parent 1321779 commit 9a06c5a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Pek.AspNetCore/Models/DResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@

public class DResult
{
public bool success { get; set; }
public Boolean success { get; set; }

public string msg { get; set; }
public String? msg { get; set; }

/// <summary>
/// 状态
/// <para>1表成功</para>
/// </summary>
public int status { get; set; }
public Int32 status { get; set; }

/// <summary>
/// 数据
/// </summary>
public object data { get; set; }
public Object? data { get; set; }

/// <summary>
/// 附加数据
/// </summary>
public object extdata { get; set; }
public Object? extdata { get; set; }

public int code { get; set; }
public Int32 code { get; set; }

/// <summary>
/// 网址路径
/// </summary>
public string locate { get; set; }
public String? locate { get; set; }
}

public class DResult<T> : DResult
{
public T TData { get; set; }
public T? TData { get; set; }
}

0 comments on commit 9a06c5a

Please sign in to comment.