23 lines
366 B
Dart
23 lines
366 B
Dart
class Item {
|
|
int id;
|
|
String mime;
|
|
int tagId;
|
|
String dest;
|
|
|
|
Item({
|
|
required this.id,
|
|
required this.mime,
|
|
this.tagId = 0,
|
|
this.dest = ''
|
|
});
|
|
|
|
factory Item.fromJson(Map<String, dynamic> data) {
|
|
return Item(
|
|
id: data['id'],
|
|
mime: data['mime'],
|
|
tagId: data['tag_id'] ?? 0,
|
|
dest: data['dest'] ?? ''
|
|
);
|
|
}
|
|
}
|