Files
simapi-cj/src/communications/SimApiBaseRequest.cj
T
xrain 79a997c014 refactor: 删除 SimApiBaseRequest 空类 + Request DTO 去掉显式构造器
- SimApiBaseRequest 空类无意义:.NET 无此类、仓颉版无继承无使用,删除
- SimApiIdOnlyRequest/SimApiStringIdOnlyRequest/SimApiOneFieldRequest/
  SimApiBasePageRequest 去掉所有显式构造器(含带参)——它们只作反序列化
  目标,无参构造由编译器自动提供,带参构造无人调用
2026-08-18 01:18:12 +08:00

41 lines
898 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* Copyright (c) 2025 SimcuTeam. All rights reserved.
* 移植自 C# 项目 SimApiE:\simcu\simapi-net),遵循 MIT 许可证。
* 通用请求 DTO(对齐 C# Communications/SimApiBaseRequest.cs)。
*
* 说明:这些类仅作反序列化目标(FromJson<T> / @FromBody),无参构造由编译器自动提供;
* 不声明显式构造器。
*/
package simapi.communications
/**
* 仅包含 Id 的请求。
*/
public class SimApiIdOnlyRequest {
public var id: Int64 = 0
}
/**
* 仅包含 Id 的请求(字符串)。
*/
public class SimApiStringIdOnlyRequest {
public var id: String = ""
}
/**
* 单字段请求。
* @param T 数据类型。
*/
public class SimApiOneFieldRequest<T> {
public var data: ?T = None
}
/**
* 基础分页请求。
*/
public class SimApiBasePageRequest {
public var page: Int64 = 1
public var count: Int64 = 20
}