import 'content.dart';

class MainPageList {
  final String type;
  final String header;
  final String more;
  final String link;
  final List<MainPageContentType> contents;

  const MainPageList({
    required this.type,
    required this.header,
    required this.more,
    required this.link,
    required this.contents,
  });

  factory MainPageList.fromJson(Map<String, dynamic> json) => MainPageList(
      type: json['type'],
      header: json['header'],
      more: json['more'],
      link: json['link'],
      contents: List<MainPageContentType>.from(json['contents'].map(
        (x) => MainPageContentType.fromJson(x),
      )));
}
