toJson method
Implementation
Map<String, dynamic> toJson() {
return {
if (id != null) 'id': id,
if (userId != null) 'userId': userId,
if (workflowId != null) 'workflowId': workflowId,
if (role != null) 'role': role,
if (createdAt != null) 'createdAt': createdAt?.toIso8601String(),
if (updatedAt != null) 'updatedAt': updatedAt?.toIso8601String(),
};
}