1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- 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<PropertyNewsList>? list;
- PropertyNewsEntity();
- factory PropertyNewsEntity.fromJson(Map<String, dynamic> json) => $PropertyNewsEntityFromJson(json);
- Map<String, dynamic> 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<String, dynamic> json) => $PropertyNewsListFromJson(json);
- Map<String, dynamic> toJson() => $PropertyNewsListToJson(this);
- @override
- String toString() {
- return jsonEncode(this);
- }
- }
|