2024-10-07 23:44:26 +04:00

33 lines
920 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'bread_dto.g.dart';
@JsonSerializable(createToJson: false)
class BreadsDto {
final List<BreadDataDto>? data;
const BreadsDto({this.data});
factory BreadsDto.fromJson(Map<String, dynamic> json) => _$BreadsDtoFromJson(json);
}
@JsonSerializable(createToJson: false)
class BreadDataDto {
final String? id;
final String? type;
final BreadAttributesDataDto? attributes;
const BreadDataDto({this.id, this.type, this.attributes});
factory BreadDataDto.fromJson(Map<String, dynamic> json) => _$BreadDataDtoFromJson(json);
}
@JsonSerializable(createToJson: false)
class BreadAttributesDataDto {
final String? name;
final String? info;
final String? image;
const BreadAttributesDataDto({this.name, this.info, this.image});
factory BreadAttributesDataDto.fromJson(Map<String, dynamic> json) => _$BreadAttributesDataDtoFromJson(json);
}