import 'package:json_annotation/json_annotation.dart';

part 'BannerInfo.g.dart';

@JsonSerializable()
class BannerInfo {
  BannerInfo(this.id, this.imageUrl);
  int id;
  String imageUrl;
  factory BannerInfo.fromJson(Map<String, dynamic> json) => _$BannerInfoFromJson(json);

  Map<String, dynamic> toJson() => _$BannerInfoToJson(this);

  // 命名构造函数
  BannerInfo.empty();

  @override
  String toString() {
    return _$BannerInfoToJson(this).toString();
  }
}
