26 lines
664 B
Dart
26 lines
664 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'PlaceDTO.g.dart';
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class PlacesDto {
|
|
final List<PlaceDataDto>? data;
|
|
|
|
const PlacesDto({this.data});
|
|
|
|
factory PlacesDto.fromJson(Map<String, dynamic> json) => _$PlacesDtoFromJson(json);
|
|
}
|
|
|
|
@JsonSerializable(createToJson: false)
|
|
class PlaceDataDto {
|
|
final int? id;
|
|
final String? name;
|
|
final int? yearBuilt;
|
|
final String? description;
|
|
final String? imageData;
|
|
|
|
const PlaceDataDto({this.id, this.name, this.yearBuilt, this.description, this.imageData});
|
|
|
|
factory PlaceDataDto.fromJson(Map<String, dynamic> json) => _$PlaceDataDtoFromJson(json);
|
|
}
|