notice_board_event_entity.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/notice_board_event_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/notice_board_event_entity.g.dart';
  5. @JsonSerializable()
  6. class NoticeBoardEventEntity {
  7. late int count = 0;
  8. late int page = 0;
  9. late int limit = 0;
  10. @JSONField(name: "count_page")
  11. late int countPage = 0;
  12. late List<NoticeBoardEventList> list = [];
  13. NoticeBoardEventEntity();
  14. factory NoticeBoardEventEntity.fromJson(Map<String, dynamic> json) => $NoticeBoardEventEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $NoticeBoardEventEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class NoticeBoardEventList {
  23. late int id = 0;
  24. late String title = '';
  25. late String datetime = '';
  26. @JSONField(name: "created_at")
  27. late String createdAt = '';
  28. NoticeBoardEventList();
  29. factory NoticeBoardEventList.fromJson(Map<String, dynamic> json) => $NoticeBoardEventListFromJson(json);
  30. Map<String, dynamic> toJson() => $NoticeBoardEventListToJson(this);
  31. @override
  32. String toString() {
  33. return jsonEncode(this);
  34. }
  35. }