PostsModel.dart 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. import 'package:json_annotation/json_annotation.dart';
  2. part 'PostsModel.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(this.postsID,this.postsContent,this.postsMaker,this.postsMakeDate,this.postsPicCount,this.postsReaded,this.postsLoved,this.postsPics,this.ifLY
  29. ,this.ifOfficial,this.ifUserLoved,this.latitude,this.longitude,this.makerID,this.makerName,this.makerPhoto,this.picsPath,this.picsRate,this.picsSimpPath,this.postsLocation,this.postsStatus
  30. ,this.postsType,this.whenPosts);
  31. factory PostsModel.fromJson(Map<String, dynamic> json) => _$PostsModelFromJson(json);
  32. Map<String, dynamic> toJson() => _$PostsModelToJson(this);
  33. }