import 'package:eatvio_app/core/models/pagination_model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'sub_model.freezed.dart'; part 'sub_model.g.dart'; @freezed abstract class SubPaginationModel with _$SubPaginationModel { const factory SubPaginationModel({ required List data, required Links links, required Meta meta, }) = _SubPaginationModel; factory SubPaginationModel.fromJson(Map json) => _$SubPaginationModelFromJson(json); } @freezed abstract class SubModel with _$SubModel { const factory SubModel({ required String slug, required String name, required String city, required DateTime birthdate, @JsonKey(name: 'is_entity_subscribed_by_me') required bool isEntitySubscribedByMe, @JsonKey(name: 'profile_photo_url') required String profilePhotoUrl, required List roles, }) = _SubModel; factory SubModel.fromJson(Map json) => _$SubModelFromJson(json); }