factory Attachment.fromJson(Map<String, dynamic> json) => Attachment( url: json['url'], mediaType: (json['type'] as String).mediaType, );