You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

66 lines
1.4 KiB

import 'package:huixiang/generated/json/base/json_field.dart';
import 'package:huixiang/generated/json/comunity_comment.g.dart';
import 'dart:convert';
export 'package:huixiang/generated/json/comunity_comment.g.dart';
@JsonSerializable()
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<String, dynamic> json) => $ComunityCommentFromJson(json);
Map<String, dynamic> toJson() => $ComunityCommentToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}
@JsonSerializable()
class SubjectInfo {
String? type = '';
List<String>? images = [];
String? video = '';
SubjectInfo();
factory SubjectInfo.fromJson(Map<String, dynamic> json) => $SubjectInfoFromJson(json);
Map<String, dynamic> toJson() => $SubjectInfoToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}
@JsonSerializable()
class ComunityMemberInfo {
dynamic mid;
dynamic nickname;
String? avatar = '';
ComunityMemberInfo();
factory ComunityMemberInfo.fromJson(Map<String, dynamic> json) => $ComunityMemberInfoFromJson(json);
Map<String, dynamic> toJson() => $ComunityMemberInfoToJson(this);
@override
String toString() {
return jsonEncode(this);
}
}