toJson method
Returns a serialized JSON structure of the model which also includes fields used by the database.
Implementation
@override
Map<String, dynamic> toJson() {
return {
if (id != null) 'id': id,
'name': name,
'createdAt': createdAt.toJson(),
'updatedAt': updatedAt.toJson(),
'currentTranslationsKeysSha': currentTranslationsKeysSha,
'projectShaIdentifier': projectShaIdentifier.toJson(),
'description': description,
'projectReferenceName': projectReferenceName,
if (activeTranslations != null)
'activeTranslations':
activeTranslations?.toJson(valueToJson: (v) => v.toJson()),
if (accountprojectbridge != null)
'accountprojectbridge':
accountprojectbridge?.toJson(valueToJson: (v) => v.toJson()),
'appContextText': appContextText,
'contextsPerPath': contextsPerPath.toJson(valueToJson: (v) => v.toJson()),
'lastShaStampId': lastShaStampId,
if (lastShaStamp != null) 'lastShaStamp': lastShaStamp?.toJson(),
'codeBaseId': codeBaseId,
if (codeBase != null) 'codeBase': codeBase?.toJson(),
'pathAppearancesPerKeyId': pathAppearancesPerKeyId,
if (pathAppearancesPerKey != null)
'pathAppearancesPerKey': pathAppearancesPerKey?.toJson(),
};
}