refactor: DTO 字段去下划线 + SimApiBaseResponse 不再可继承 + 删除 SimApiJson/toJsonString
- 纯 POCO DTO 字段去下划线:AuthDto(id/name/applicationId/profileId/scene 等)、 SimApiLoginItem(id/types/meta/extra)、AesBodyRequest(data)、 SimApiBaseResponse 系列(code/message/data/list/page/count/total) - SimApiBaseResponse 去 open(不再允许继承)+ 删 @SerializerParent(无子类继承) - SimApiResponse<T> / SimApiDataResponse 改为组合(自带 code/message/data) - 删除 toJsonString(无使用点,统一走 simapi_serialization) - 删除 SimApiJson.cj:json() → SimApiUtil.json() 直接序列化; escapeJson() 迁入 SimApiUtil - 同步更新所有字段引用(AuthCenter/AuthIam/HttpClient/ExceptionMiddleware 等) - 保留 sqlsharp 实体 User/Bot 的 _ 前缀(soulsoft 宏依赖)
This commit is contained in:
@@ -18,49 +18,49 @@ 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
|
||||
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 对象)。
|
||||
* 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
|
||||
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
|
||||
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 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
|
||||
this.code = code
|
||||
this.server = server
|
||||
this.fullUrl = fullUrl
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,42 +68,42 @@ public class GetCodeResponse {
|
||||
* 群组关联项(对齐 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
|
||||
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# GroupDetailTreeNode,children 递归)。
|
||||
*/
|
||||
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> = []
|
||||
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 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
|
||||
this.identifier = identifier
|
||||
this.name = name
|
||||
this.group = group
|
||||
this.description = description
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user