makeData method
Implementation
@protected
Map<String, dynamic> makeData({
required String directive,
required String mid,
required Map<String, dynamic>? delta,
}) {
Map<String, dynamic> input = {};
String now = HycopUtils.dateTimeToDB(DateTime.now());
input['directive'] = directive;
input['collectionId'] = HycopUtils.collectionFromMid(mid, collcetion_prefix);
input['mid'] = mid; //'book=3ecb527f-4f5e-4350-8705-d5742781451b';
input['userId'] = AccountManager.currentLoginUser.email;
input['deviceId'] = myDeviceId;
input['updateTime'] = now;
input['delta'] = (delta != null) ? json.encode(delta, toEncodable: myEncode) : '';
if (delta != null) {
input['realTimeKey'] = delta['realTimeKey'] ?? '';
}
return input;
}