MFileInfo.fromJson constructor

MFileInfo.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory MFileInfo.fromJson(Map<String, dynamic> json) {
  return MFileInfo(
    id: json['id'] ?? '',
    userId: json['user_id'] ?? '',
    postId: json['post_id'] ?? '',
    name: json['name'] ?? '',
    extension: json['extension'] ?? '',
    size: json['size'] ?? 0,
    mimeType: json['mime_type'] ?? '',
    width: json['width'] ?? 0,
    height: json['height'] ?? 0,
    hasPreviewImage: json['has_preview_image'] ?? false,
    createAt: json['create_at'],
    updateAt: json['update_at'],
    deleteAt: json['delete_at'],
  );
}