Files
simapi-cj/src/communications/SimApiLoginItem.cj
T

40 lines
1.2 KiB
Plaintext
Raw Normal View History

2026-08-16 12:46:15 +08:00
/*
* Copyright (c) 2025 SimcuTeam. All rights reserved.
* 移植自 C# 项目 SimApiE:\simcu\simapi-net),遵循 MIT 许可证。
* Communications/SimApiLoginItem:登录信息项。
*/
package simapi.communications
import std.collection.*
/**
* 登录信息项:Token 认证通过后注入请求上下文。
* 对齐 C# SimApiLoginItemId / Type / Meta / Extra)。
2026-08-16 12:46:15 +08:00
*
* 序列化/反序列化由 simapi_serialization 反射处理(免标注、免约束),
* 字段 _id/_types/_meta/_extra 全部为受支持类型(String/Array/HashMap)。
2026-08-16 12:46:15 +08:00
*/
public class SimApiLoginItem {
2026-08-16 12:46:15 +08:00
public var _id: String = ""
public var _types: Array<String> = ["user"]
2026-08-16 12:46:15 +08:00
public var _meta: HashMap<String, String> = HashMap<String, String>()
public var _extra: HashMap<String, Any> = HashMap<String, Any>()
public init() {}
public init(id: String) {
this._id = id
this._types = ["user"]
this._meta = HashMap<String, String>()
this._extra = HashMap<String, Any>()
}
public init(id: String, types: Array<String>) {
this._id = id
this._types = types
this._meta = HashMap<String, String>()
this._extra = HashMap<String, Any>()
}
}