toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.dateCreated != null) {
json[r'date_created'] = this.dateCreated!.toUtc().toIso8601String();
} else {
json[r'date_created'] = null;
}
if (this.lastUpdated != null) {
json[r'last_updated'] = this.lastUpdated!.toUtc().toIso8601String();
} else {
json[r'last_updated'] = null;
}
if (this.favoriteId != null) {
json[r'favorite_id'] = this.favoriteId;
} else {
json[r'favorite_id'] = null;
}
json[r'asset_id'] = this.assetId;
if (this.userId != null) {
json[r'user_id'] = this.userId;
} else {
json[r'user_id'] = null;
}
json[r'company_id'] = this.companyId;
if (this.notes != null) {
json[r'notes'] = this.notes;
} else {
json[r'notes'] = null;
}
if (this.category != null) {
json[r'category'] = this.category;
} else {
json[r'category'] = null;
}
json[r'priority'] = this.priority;
return json;
}