import 'package:json_annotation/json_annotation.dart'; part 'appconfig_model.g.dart'; // 生成的文件名 @JsonSerializable() class UserGetAppConfigResp { final Map env; final List agents; final Map mcps; final List products; UserGetAppConfigResp( {required this.env, required this.agents, required this.mcps, required this.products}); factory UserGetAppConfigResp.fromJson(Map json) => _$UserGetAppConfigRespFromJson(json); Map toJson() => _$UserGetAppConfigRespToJson(this); } @JsonSerializable() class DBAgent { final String id; final String name; final String avatarUrl; final String description; final String tag; final bool isOnline; final String voice; final String? welcomeMessage; final String? voiceWelcomeMessage; final String? systemPrompt; final String? tools; DBAgent({ required this.id, required this.name, required this.avatarUrl, required this.description, required this.tag, required this.isOnline, required this.voice, required this.welcomeMessage, required this.voiceWelcomeMessage, required this.systemPrompt, required this.tools, }); factory DBAgent.fromJson(Map json) => _$DBAgentFromJson(json); Map toJson() => _$DBAgentToJson(this); } @JsonSerializable() class DBMCPServer { final String servername; final String url; final String tools; DBMCPServer({ required this.servername, required this.url, required this.tools, }); factory DBMCPServer.fromJson(Map json) => _$DBMCPServerFromJson(json); Map toJson() => _$DBMCPServerToJson(this); } @JsonSerializable() class DBProduct { final int id; final int factoryid; final int devicetype; final String devicename; final String scanuuid; final String version; final String updatedescription; final String updatepackageaddress; DBProduct({ required this.id, required this.factoryid, required this.devicetype, required this.devicename, required this.scanuuid, required this.version, required this.updatedescription, required this.updatepackageaddress, }); factory DBProduct.fromJson(Map json) => _$DBProductFromJson(json); Map toJson() => _$DBProductToJson(this); }