import 'package:json_annotation/json_annotation.dart';

part 'intimacy_analyse_report.g.dart';

@JsonSerializable()
class IntimacyAnalyseReport {
  @JsonKey(name: 'list')
  final List<AnalyseItem> list;

  IntimacyAnalyseReport({required this.list});

  factory IntimacyAnalyseReport.fromJson(Map<String, dynamic> json) =>
      _$IntimacyAnalyseReportFromJson(json);

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

@JsonSerializable()
class AnalyseItem {
  @JsonKey(name: 'title')
  final String title;

  @JsonKey(name: 'sections')
  final List<String> sections;

  AnalyseItem({
    required this.title,
    required this.sections,
  });

  factory AnalyseItem.fromJson(Map<String, dynamic> json) =>
      _$AnalyseItemFromJson(json);

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