Initial draft
This commit is contained in:
18
lib/dto/image.dart
Normal file
18
lib/dto/image.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'image.g.dart';
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class ImageDTO {
|
||||
ImageDTO(
|
||||
{required this.url, required this.name, required this.oid});
|
||||
|
||||
String url;
|
||||
String name;
|
||||
String oid;
|
||||
|
||||
factory ImageDTO.fromJson(Map<String, dynamic> json) =>
|
||||
_$ImageDTOFromJson(json);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => _$ImageDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user