import 'package:domain/generated/json/base/json_field.dart'; import 'package:domain/generated/json/property_news_entity.g.dart'; import 'dart:convert'; export 'package:domain/generated/json/property_news_entity.g.dart'; @JsonSerializable() class PropertyNewsEntity { int? count; int? page; int? limit; @JSONField(name: "count_page") int? countPage; List? list; PropertyNewsEntity(); factory PropertyNewsEntity.fromJson(Map json) => $PropertyNewsEntityFromJson(json); Map toJson() => $PropertyNewsEntityToJson(this); @override String toString() { return jsonEncode(this); } } @JsonSerializable() class PropertyNewsList { int? id; String? title; @JSONField(name: "cover_image") String? coverImage; String? content; @JSONField(name: "likes_count") int? likesCount; bool? liked; @JSONField(name: "created_at") String? createdAt; PropertyNewsList(); factory PropertyNewsList.fromJson(Map json) => $PropertyNewsListFromJson(json); Map toJson() => $PropertyNewsListToJson(this); @override String toString() { return jsonEncode(this); } }