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.
57 lines
1.2 KiB
57 lines
1.2 KiB
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<String, dynamic> json) => _$ComunityCommentFromJson(json); |
|
|
|
Map<String, dynamic> toJson() => _$ComunityCommentToJson(this); |
|
|
|
|
|
} |
|
|
|
|
|
@JsonSerializable(explicitToJson: true) |
|
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); |
|
|
|
|
|
} |
|
|
|
@JsonSerializable(explicitToJson: true) |
|
class ComunityMemberInfo { |
|
dynamic mid; |
|
dynamic nickname; |
|
String? avatar = ''; |
|
|
|
ComunityMemberInfo(); |
|
|
|
factory ComunityMemberInfo.fromJson(Map<String, dynamic> json) => _$ComunityMemberInfoFromJson(json); |
|
|
|
Map<String, dynamic> toJson() => _$ComunityMemberInfoToJson(this); |
|
|
|
|
|
} |