说明生成结果 DTO 的 number 精度边界
为 poll_after_ms、updated_at_micros、size_bytes 补充注释,说明其量级远低于 2^53,按 TS number 导出即可精确表示 重新生成 TypeScript 绑定,把上述说明同步为 JSDoc 技术方案补充同一说明,明确不做 bigint/string 特殊处理
This commit is contained in:
@@ -12,6 +12,7 @@ pub struct Model3dGenerationSubmission {
|
||||
pub operation_id: String,
|
||||
pub status: Model3dTaskStatus,
|
||||
pub status_url: String,
|
||||
/// 轮询间隔(毫秒),量级为分钟级,远低于 2^53,按 TS number 导出。
|
||||
#[ts(type = "number")]
|
||||
pub poll_after_ms: u64,
|
||||
}
|
||||
@@ -29,6 +30,7 @@ pub struct Model3dGenerationJob {
|
||||
pub error: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub result: Option<Model3dGenerationResult>,
|
||||
/// 更新时间(Unix 微秒);2^53 微秒约到公元 2255 年,按 TS number 导出即可精确表示。
|
||||
#[ts(type = "number")]
|
||||
pub updated_at_micros: i64,
|
||||
}
|
||||
@@ -51,6 +53,7 @@ pub struct Model3dArtifact {
|
||||
pub resource_id: String,
|
||||
pub format: Model3dOutputFormat,
|
||||
pub content_type: String,
|
||||
/// 产物字节数,当前单模型产物为几十 MB,远低于 2^53,按 TS number 导出。
|
||||
#[ts(type = "number")]
|
||||
pub size_bytes: u64,
|
||||
pub sha256: String,
|
||||
|
||||
Reference in New Issue
Block a user