Files
simapi-cj/src/authsdk/SimApiAuthDto.cj
T
xrain ea31bd9b6a refactor: 删除仅有空构造器的 public init() {}——编译器自动提供无参构造
删除(类无其他构造器):
- SimApiBaseModel / SimApiLoggerProvider / SimApiSignProviderBase / AesBodyProviderBase
- SimApiResponseFilter / SimApiAuthCenterOptions / SimApiExceptionOptions
- SimApiHttpClientOptions / SimApiOptions / SimApiSynapseOptions / SimApiRouteOptions
- SimApiStorageOptions / SimApiRequestLogOptions / SimApiJobServer / SimApiAuthOption
- AuthDto 5 个纯 POCO(AppAndProfileItem/ConfirmResponse/LoginInfoResponse/
  GroupRelatedItem/GroupDetailTreeNode)/ AesBodyRequest

保留(有带参构造器,空 init 是反序列化/绑定必需):
- GetCodeResponse / PermissionItem / SimApiBaseRequest 系列 / PageResponse
- SimApiLoginItem / SimApiDocGroup / SimApiStorage 相关 / 各 DTO
2026-08-18 00:59:48 +08:00

110 lines
3.1 KiB
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 许可证。
* AuthSDK 用到的 DTO(对齐 C# SimApiAuthCenterDto / SimApiAuthIamDto)。
*
* 说明:C# 中这些 DTO 是 SimApiAuthCenterDto / SimApiAuthIamDto 的嵌套类;
* 仓颉不支持在类体内声明嵌套类(unexpected class declaration in class body),
* 故拍平为顶层类,语义与字段保持一致。
*
* 序列化/反序列化由 simapi_serialization 反射处理(免标注、免约束)。
*/
package simapi.authsdk
import std.collection.*
/**
* 应用/Profile 通用项(对齐 C# AppAndProfileItem)。
*/
public class AppAndProfileItem {
public var _id: String = ""
public var _name: String = ""
public var _image: ?String = None
public var _description: ?String = None
}
/**
* 安全确认响应(对齐 C# ConfirmResponse)。
* _data 用 ?HashMap<String, Any> 对齐 C# Dictionary<string,object>?(任意 JSON 对象)。
*/
public class ConfirmResponse {
public var _applicationId: String = ""
public var _profileId: String = ""
public var _scene: ?String = None
public var _data: ?HashMap<String, Any> = None
}
/**
* 登录信息响应(对齐 C# LoginInfoResponse)。
*/
public class LoginInfoResponse {
public var _scene: ?String = None
public var _data: ?HashMap<String, Any> = None
public var _profileId: String = ""
public var _name: String = ""
public var _image: ?String = None
public var _description: ?String = None
}
/**
* 获取授权码响应(对齐 C# GetCodeResponse)。
*/
public class GetCodeResponse {
public var _code: String = ""
public var _server: String = ""
public var _fullUrl: String = ""
public init() {}
public init(code: String, server: String, fullUrl: String) {
this._code = code
this._server = server
this._fullUrl = fullUrl
}
}
/**
* 群组关联项(对齐 C# GroupRelatedItem)。
*/
public class GroupRelatedItem {
public var _id: String = ""
public var _name: String = ""
public var _image: ?String = None
public var _description: ?String = None
public var _isOwner: Bool = false
public var _isAdmin: Bool = false
public var _isMember: Bool = false
}
/**
* 群组详情树节点(对齐 C# GroupDetailTreeNodechildren 递归)。
*/
public class GroupDetailTreeNode {
public var _id: String = ""
public var _name: String = ""
public var _image: ?String = None
public var _description: ?String = None
public var _sort: Int64 = 0
public var _children: Array<GroupDetailTreeNode> = []
}
/**
* 权限项(对齐 C# PermissionItem)。
*/
public class PermissionItem {
public var _identifier: String = ""
public var _name: String = ""
public var _group: String = ""
public var _description: String = ""
public init() {}
public init(identifier: String, name: String, group: String, description: String) {
this._identifier = identifier
this._name = name
this._group = group
this._description = description
}
}