latest_news_detail_entity.dart 725 B

123456789101112131415161718192021222324252627
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/latest_news_detail_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/latest_news_detail_entity.g.dart';
  5. @JsonSerializable()
  6. class LatestNewsDetailEntity {
  7. String? id;
  8. int type = 0;
  9. String? title;
  10. @JSONField(name: "cover_image")
  11. String? coverImage;
  12. String? content;
  13. @JSONField(name: "created_at")
  14. String? createdAt;
  15. LatestNewsDetailEntity();
  16. factory LatestNewsDetailEntity.fromJson(Map<String, dynamic> json) => $LatestNewsDetailEntityFromJson(json);
  17. Map<String, dynamic> toJson() => $LatestNewsDetailEntityToJson(this);
  18. @override
  19. String toString() {
  20. return jsonEncode(this);
  21. }
  22. }