Files
simapi-cj/src/authsdk/SimApiAuthDto.cj
T

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 simcu::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
}
}