12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- import 'package:domain/generated/json/base/json_field.dart';
- import 'package:domain/generated/json/newsfeed_news_entity.g.dart';
- import 'dart:convert';
- export 'package:domain/generated/json/newsfeed_news_entity.g.dart';
- @JsonSerializable()
- class NewsfeedNewsEntity {
- int? count;
- int? page;
- int? limit;
- @JSONField(name: "count_page")
- int? countPage;
- List<NewsfeedNewsList>? list;
- NewsfeedNewsEntity();
- factory NewsfeedNewsEntity.fromJson(Map<String, dynamic> json) => $NewsfeedNewsEntityFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedNewsEntityToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class NewsfeedNewsList {
- int? id;
- String? content;
- List<String>? resources;
- @JSONField(name: "likes_count")
- int? likesCount;
- @JSONField(name: "comments_count")
- int? commentsCount;
- bool? liked;
- @JSONField(name: "created_at")
- String? createdAt;
- NewsfeedNewsListAccount? account;
- NewsfeedNewsList();
- factory NewsfeedNewsList.fromJson(Map<String, dynamic> json) => $NewsfeedNewsListFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedNewsListToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
- @JsonSerializable()
- class NewsfeedNewsListAccount {
- int? id;
- String? name;
- String? avatar;
- bool? followed;
- NewsfeedNewsListAccount();
- factory NewsfeedNewsListAccount.fromJson(Map<String, dynamic> json) => $NewsfeedNewsListAccountFromJson(json);
- Map<String, dynamic> toJson() => $NewsfeedNewsListAccountToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|