LogReport.fromJson constructor
LogReport.fromJson(
- Map<String, dynamic> map
)
Implementation
factory LogReport.fromJson(Map<String, dynamic> map) {
return LogReport(
id: DbQueryField.tryParseObjectId(map['_id']),
bsid: DbQueryField.tryParseObjectId(map['_bsid']),
time: DbQueryField.tryParseInt(map['_time']),
extra: map['_extra'] is Map ? DbJsonWraper.fromJson(map['_extra']) : map['_extra'],
trans: (map['_trans'] as List?)?.map((v) => DbQueryField.parseObjectId(v)).toList(),
uid: DbQueryField.tryParseObjectId(map['uid']),
type: DbQueryField.tryParseInt(map['type']),
state: DbQueryField.tryParseInt(map['state']),
image: DbQueryField.tryParseString(map['image']),
relation: DbQueryField.tryParseObjectId(map['relation']),
host: DbQueryField.tryParseString(map['host']),
href: DbQueryField.tryParseString(map['href']),
customXNo: DbQueryField.tryParseInt(map['customXNo']),
customXId: DbQueryField.tryParseObjectId(map['customXId']),
desc: DbQueryField.tryParseString(map['desc']),
);
}