import 'package:json_annotation/json_annotation.dart'; part 'comunity_comment.g.dart'; @JsonSerializable(explicitToJson: true) class ComunityComment { String? id = ''; String? subject = ''; String? location = ''; SubjectInfo? subjectInfo; ComunityMemberInfo? memberInfo; int? likes = 0; int? viewers = 0; int? comments = 0; bool? selfLike = false; bool? selfFollow = false; String? createTime = ''; ComunityComment(); factory ComunityComment.fromJson(Map json) => _$ComunityCommentFromJson(json); Map toJson() => _$ComunityCommentToJson(this); } @JsonSerializable(explicitToJson: true) class SubjectInfo { String? type = ''; List? images = []; String? video = ''; SubjectInfo(); factory SubjectInfo.fromJson(Map json) => _$SubjectInfoFromJson(json); Map toJson() => _$SubjectInfoToJson(this); } @JsonSerializable(explicitToJson: true) class ComunityMemberInfo { dynamic mid; dynamic nickname; String? avatar = ''; ComunityMemberInfo(); factory ComunityMemberInfo.fromJson(Map json) => _$ComunityMemberInfoFromJson(json); Map toJson() => _$ComunityMemberInfoToJson(this); }