Last active
May 9, 2022 15:19
-
-
Save yunus-floo/18138d869b5d1ea44fa9c5a602369c34 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AttachmentDTO { | |
int id; | |
String local_path; | |
String path_file; | |
String parent_id; | |
String type; | |
AttachmentDTO({this.id, this.local_path, this.parent_id, this.path_file, this.type}); | |
factory Attachment.fromJson(Map<String, dynamic> json) => Attachment( | |
id: json["id"], | |
parent_id: json["parent_id"], | |
type: json["type"], | |
path_file: json["path_file"], | |
local_path: json["local_path"], | |
); | |
Map<String, dynamic> toJson() => { | |
"id": id, | |
"parent_id": parent_id, | |
"type": type, | |
"path_file": path_file, | |
"local_path": local_path, | |
}; | |
Attachment toEntity() => Attachment(id: id, parent_id: parent_id, type: type, path_file: path_file, local_path:local_path); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment