visitor_page_entity.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/visitor_page_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/visitor_page_entity.g.dart';
  5. @JsonSerializable()
  6. class VisitorPageEntity {
  7. int count = 0;
  8. int page =0 ;
  9. int limit=0;
  10. @JSONField(name: "count_page")
  11. int countPage=0;
  12. List<VisitorPageList> list = [];
  13. VisitorPageEntity();
  14. factory VisitorPageEntity.fromJson(Map<String, dynamic> json) => $VisitorPageEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $VisitorPageEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }
  21. @JsonSerializable()
  22. class VisitorPageList {
  23. String? id;
  24. String? name;
  25. String? phone;
  26. String? nric;
  27. @JSONField(name: "vehicle_number")
  28. String? vehicleNumber;
  29. @JSONField(name: "created_at")
  30. String? createdAt;
  31. String? note;
  32. VisitorPageList();
  33. factory VisitorPageList.fromJson(Map<String, dynamic> json) => $VisitorPageListFromJson(json);
  34. Map<String, dynamic> toJson() => $VisitorPageListToJson(this);
  35. @override
  36. String toString() {
  37. return jsonEncode(this);
  38. }
  39. }