feedback_list_entity.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import 'package:domain/entity/id_name_entity.dart';
  2. import 'package:domain/generated/json/base/json_field.dart';
  3. import 'package:domain/generated/json/feedback_list_entity.g.dart';
  4. import 'dart:convert';
  5. export 'package:domain/generated/json/feedback_list_entity.g.dart';
  6. @JsonSerializable()
  7. class FeedbackListEntity {
  8. int count = 0;
  9. int page = 0;
  10. @JSONField(name: "count_page")
  11. int countPage = 1;
  12. int limit = 0;
  13. List<FeedbackItemEntity>? list = [];
  14. FeedbackListEntity();
  15. factory FeedbackListEntity.fromJson(Map<String, dynamic> json) => $FeedbackListEntityFromJson(json);
  16. Map<String, dynamic> toJson() => $FeedbackListEntityToJson(this);
  17. @override
  18. String toString() {
  19. return jsonEncode(this);
  20. }
  21. }
  22. @JsonSerializable()
  23. class FeedbackItemEntity {
  24. String? id;
  25. String? title;
  26. String? content;
  27. int status = 0;
  28. @JSONField(name: "created_at")
  29. String? createdAt;
  30. IdNameEntity? category;
  31. FeedbackItemEntity();
  32. factory FeedbackItemEntity.fromJson(Map<String, dynamic> json) => $FeedbackItemEntityFromJson(json);
  33. Map<String, dynamic> toJson() => $FeedbackItemEntityToJson(this);
  34. @override
  35. String toString() {
  36. return jsonEncode(this);
  37. }
  38. }