import 'package:json_annotation/json_annotation.dart'; import 'package:uuid/uuid.dart'; @JsonSerializable(createToJson: false) class AlbumDto { final List? data; const AlbumDto({this.data,}); } @JsonSerializable(createToJson: false) class AlbumDataDto { final String id; final String? title; final String? artist; String? year; List? genres; List? tracks; String? summary; String? url; final AlbumDataImagesDto? images; AlbumDataDto({ String? id, this.title, this.artist, this.year, this.genres, this.tracks, this.summary, this.url, this.images, }) : id = id ?? const Uuid().v4(); // Генерация id } @JsonSerializable(createToJson: false) class AlbumDataImagesDto { final AlbumDataImagesJPGDto? jpg; const AlbumDataImagesDto({this.jpg}); } @JsonSerializable(createToJson: false) class AlbumDataImagesJPGDto { final String? image_url; const AlbumDataImagesJPGDto({this.image_url}); }