import 'package:zhiying_comm/zhiying_comm.dart';

class HomeBannerModel {
  List<HomeBannerListItemModel> list;

  HomeBannerModel({this.list});

  factory HomeBannerModel.fromJson(Map<String, dynamic> json) {
    return HomeBannerModel(
      list: json['list'] != null
          ? (json['list'] as List)
              .map((i) => HomeBannerListItemModel.fromJson(i))
              .toList()
          : null,
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.list != null) {
      data['list'] = this.list.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class HomeBannerListItemModel extends SkipModel {
  String img;

  HomeBannerListItemModel({this.img});

  HomeBannerListItemModel.fromJson(Map<String, dynamic> json) {
    super.fromJson(json);
    img = json['img']?.toString();
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = super.toJson();
    data['img'] = this.img;
    return data;
  }
}
