import 'package:boilerplate/domain/entities/master/banner_data.dart';
import 'package:json_annotation/json_annotation.dart';

part 'banner_res_model.g.dart';

@JsonSerializable(createToJson: false)
class BannerResModel {
  final List<BannerResultModel> result;

  BannerResModel(this.result);

  factory BannerResModel.fromJson(json) => _$BannerResModelFromJson(json);
}

@JsonSerializable(createToJson: false)
class BannerResultModel extends BannerData {
  @JsonKey(name: 'cover_mobile')
  final String cover;

  BannerResultModel({
    required super.id,
    required super.name,
    super.link,
    super.status,
    required this.cover,
  }) : super(cover: cover);

  factory BannerResultModel.fromJson(json) => _$BannerResultModelFromJson(json);
}
