50 lines
1.1 KiB
Dart
50 lines
1.1 KiB
Dart
import 'package:cross_file/cross_file.dart';
|
|
|
|
class SendMessageModel {
|
|
int? id;
|
|
String? query;
|
|
String? option;
|
|
String? messageId;
|
|
int? botId;
|
|
bool? retry;
|
|
XFile? file;
|
|
bool? tool;
|
|
bool? ghost;
|
|
bool? webSearch;
|
|
|
|
SendMessageModel(
|
|
{this.id,
|
|
this.query,
|
|
this.botId,
|
|
this.option,
|
|
this.retry,
|
|
this.file,
|
|
this.messageId,
|
|
this.ghost = false,
|
|
this.webSearch = false,
|
|
this.tool = false});
|
|
|
|
SendMessageModel.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
query = json['query'];
|
|
botId = json['bot_id'];
|
|
retry = json['retry'];
|
|
option = json['options'];
|
|
ghost = json['ghost'];
|
|
ghost = json['ghost'];
|
|
webSearch = json['web_search'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['query'] = query;
|
|
data['options'] = option;
|
|
data['bot_id'] = botId;
|
|
data['retry'] = retry ?? false;
|
|
data['ghost'] = ghost ?? false;
|
|
data['web_search'] = webSearch ?? false;
|
|
return data;
|
|
}
|
|
}
|