posts_model.dart 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'posts_model.g.dart';
  3. @JsonSerializable()
  4. class PostsModel extends Object {
  5. String postsID;
  6. String postsContent;
  7. String postsMaker;
  8. DateTime postsMakeDate;
  9. int postsPicCount;
  10. int postsReaded;
  11. int postsLoved;
  12. String postsPics;
  13. String makerName;
  14. String makerID;
  15. String picsSimpPath;
  16. String picsPath;
  17. String whenPosts;
  18. String makerPhoto;
  19. double latitude;
  20. double longitude;
  21. String postsLocation;
  22. String postsType;
  23. int postsStatus;
  24. int ifOfficial;
  25. int ifLY;
  26. double picsRate;
  27. bool ifUserLoved;
  28. PostsModel(
  29. this.postsID,
  30. this.postsContent,
  31. this.postsMaker,
  32. this.postsMakeDate,
  33. this.postsPicCount,
  34. this.postsReaded,
  35. this.postsLoved,
  36. this.postsPics,
  37. this.ifLY,
  38. this.ifOfficial,
  39. this.ifUserLoved,
  40. this.latitude,
  41. this.longitude,
  42. this.makerID,
  43. this.makerName,
  44. this.makerPhoto,
  45. this.picsPath,
  46. this.picsRate,
  47. this.picsSimpPath,
  48. this.postsLocation,
  49. this.postsStatus,
  50. this.postsType,
  51. this.whenPosts);
  52. factory PostsModel.fromJson(Map<String, dynamic> json) =>
  53. _$PostsModelFromJson(json);
  54. Map<String, dynamic> toJson() => _$PostsModelToJson(this);
  55. }