Map<String, dynamic> toJson() { return <String, dynamic>{ if (createdBy != null) r'createdBy': createdBy, }; }