123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- import 'package:domain/generated/json/base/json_field.dart';
- import 'package:domain/generated/json/newsfeed_detail_entity.g.dart';
- import 'dart:convert';
- export 'package:domain/generated/json/newsfeed_detail_entity.g.dart';
- @JsonSerializable()
- class NewsfeedDetailEntity {
- int? id;
- String? content;
- List<String>? resources;
- int? clicks;
- int? share;
- @JSONField(name: "created_at")
- String? createdAt;
- @JSONField(name: "likes_count")
- int? likesCount;
- @JSONField(name: "comments_count")
- int? commentsCount;
- bool? liked;
- NewsfeedDetailAccount? account;
- List<NewsfeedDetailComments>? comments;
- NewsfeedDetailEntity();
- factory NewsfeedDetailEntity.fromJson(Map<String, dynamic> json) => $NewsfeedDetailEntityFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedDetailEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class NewsfeedDetailAccount {
- int? id;
- String? name;
- String? avatar;
- bool? followed;
- NewsfeedDetailAccount();
- factory NewsfeedDetailAccount.fromJson(Map<String, dynamic> json) => $NewsfeedDetailAccountFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedDetailAccountToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class NewsfeedDetailComments {
- int? id;
- String? content;
- @JSONField(name: "created_at")
- String? createdAt;
- NewsfeedDetailCommentsAccount? account;
- @JSONField(name: "to_account")
- NewsfeedDetailCommentsToAccount? toAccount;
- NewsfeedDetailComments();
- factory NewsfeedDetailComments.fromJson(Map<String, dynamic> json) => $NewsfeedDetailCommentsFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedDetailCommentsToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class NewsfeedDetailCommentsAccount {
- int? id;
- String? name;
- String? avatar;
- NewsfeedDetailCommentsAccount();
- factory NewsfeedDetailCommentsAccount.fromJson(Map<String, dynamic> json) => $NewsfeedDetailCommentsAccountFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedDetailCommentsAccountToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class NewsfeedDetailCommentsToAccount {
- int? id;
- String? name;
- String? avatar;
- NewsfeedDetailCommentsToAccount();
- factory NewsfeedDetailCommentsToAccount.fromJson(Map<String, dynamic> json) => $NewsfeedDetailCommentsToAccountFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedDetailCommentsToAccountToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|