This commit is contained in:
2025-10-25 17:03:43 +08:00
parent 116cbcdc7f
commit d2b5f14e78
3 changed files with 8 additions and 9 deletions
+6 -8
View File
@@ -1,13 +1,11 @@
using System.ComponentModel.DataAnnotations;
namespace SimApi.Communications;
namespace SimApi.Communications;
/// <summary>
/// 只有ID的请求
/// </summary>
public class SimApiIdOnlyRequest
{
[Required] public int Id { get; set; }
public required int Id { get; set; }
}
/// <summary>
@@ -15,7 +13,7 @@ public class SimApiIdOnlyRequest
/// </summary>
public class SimApiStringIdOnlyRequest
{
[Required] public string? Id { get; set; }
public required string Id { get; set; }
}
/// <summary>
@@ -24,7 +22,7 @@ public class SimApiStringIdOnlyRequest
/// <typeparam name="T"></typeparam>
public class SimApiOneFieldRequest<T>
{
[Required] public T? Data { get; set; }
public required T Data { get; set; }
}
/// <summary>
@@ -32,6 +30,6 @@ public class SimApiOneFieldRequest<T>
/// </summary>
public class SimApiBasePageRequest
{
[Required] public int Page { get; set; }
[Required] public int Count { get; set; }
public required int Page { get; set; }
public required int Count { get; set; }
}
+1 -1
View File
@@ -9,6 +9,6 @@ public class SimApiLoginItem
{
public string Id { get; set; } = null!;
public string[] Type { get; set; } = ["user"];
public Dictionary<string, string> Meta { get; set; } = new();
public Dictionary<string, string> Meta { get; set; } = [];
public object? Extra { get; set; }
};