import 'package:boilerplate/domain/entities/notification/notification_data.dart';
import 'package:json_annotation/json_annotation.dart';

part 'get_notifications_res_model.g.dart';

@JsonSerializable(createToJson: false)
class GetNotificationsResModel {
  final List<GetNotificationsResultModel> result;

  GetNotificationsResModel(this.result);

  factory GetNotificationsResModel.fromJson(json) =>
      _$GetNotificationsResModelFromJson(json);
}

@JsonSerializable(createToJson: false)
class GetNotificationsResultModel extends NotificationData {
  final String message;
  final int id;
  final String status;

  GetNotificationsResultModel({
    required super.title,
    required this.message,
    required this.id,
    required this.status,
    super.payload,
    required super.type,
  }) : super(body: message, id: id, status: status);

  factory GetNotificationsResultModel.fromJson(json) =>
      _$GetNotificationsResultModelFromJson(json);
}
