Files
neomovies-mobile/lib/data/models/reaction.dart

34 lines
713 B
Dart
Raw Normal View History

2025-07-13 14:01:29 +03:00
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;
2025-10-02 18:47:08 +00:00
final String? mediaType;
final String? mediaId;
2025-07-13 14:01:29 +03:00
2025-10-02 18:47:08 +00:00
UserReaction({
this.reactionType,
this.mediaType,
this.mediaId,
});
2025-07-13 14:01:29 +03:00
factory UserReaction.fromJson(Map<String, dynamic> json) {
return UserReaction(
reactionType: json['type'] as String?,
2025-10-02 18:47:08 +00:00
mediaType: json['mediaType'] as String?,
mediaId: json['mediaId'] as String?,
2025-07-13 14:01:29 +03:00
);
}
}