feedback_detail_entity.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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_detail_entity.g.dart';
  4. import 'dart:convert';
  5. export 'package:domain/generated/json/feedback_detail_entity.g.dart';
  6. @JsonSerializable()
  7. class FeedbackDetailEntity {
  8. String? id;
  9. String? title;
  10. String? content;
  11. List<String>? resources = [];
  12. int status = 0;
  13. @JSONField(name: "created_at")
  14. String? createdAt;
  15. IdNameEntity? category;
  16. List<FeedbackDetailReplies>? replies = [];
  17. FeedbackDetailEntity();
  18. factory FeedbackDetailEntity.fromJson(Map<String, dynamic> json) => $FeedbackDetailEntityFromJson(json);
  19. Map<String, dynamic> toJson() => $FeedbackDetailEntityToJson(this);
  20. @override
  21. String toString() {
  22. return jsonEncode(this);
  23. }
  24. }
  25. @JsonSerializable()
  26. class FeedbackDetailReplies {
  27. String? id;
  28. String? content;
  29. List<String>? resources = [];
  30. @JSONField(name: "created_at")
  31. String? createdAt;
  32. IdNameEntity? accountable;
  33. FeedbackDetailReplies();
  34. factory FeedbackDetailReplies.fromJson(Map<String, dynamic> json) => $FeedbackDetailRepliesFromJson(json);
  35. Map<String, dynamic> toJson() => $FeedbackDetailRepliesToJson(this);
  36. @override
  37. String toString() {
  38. return jsonEncode(this);
  39. }
  40. }