mirror of
https://gitlab.com/foxixus/neomovies_mobile.git
synced 2025-10-28 01:18:50 +05:00
34 lines
713 B
Dart
34 lines
713 B
Dart
class Reaction {
|
|
final String type;
|
|
final int count;
|
|
|
|
Reaction({required this.type, required this.count});
|
|
|
|
factory Reaction.fromJson(Map<String, dynamic> json) {
|
|
return Reaction(
|
|
type: json['type'] as String? ?? '',
|
|
count: json['count'] as int? ?? 0,
|
|
);
|
|
}
|
|
}
|
|
|
|
class UserReaction {
|
|
final String? reactionType;
|
|
final String? mediaType;
|
|
final String? mediaId;
|
|
|
|
UserReaction({
|
|
this.reactionType,
|
|
this.mediaType,
|
|
this.mediaId,
|
|
});
|
|
|
|
factory UserReaction.fromJson(Map<String, dynamic> json) {
|
|
return UserReaction(
|
|
reactionType: json['type'] as String?,
|
|
mediaType: json['mediaType'] as String?,
|
|
mediaId: json['mediaId'] as String?,
|
|
);
|
|
}
|
|
}
|