workplace_info.dart 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. class WorkplaceInfo {
  2. WorkplaceInfo({
  3. this.id,
  4. this.placeName,
  5. this.placeAlias,
  6. this.creator,
  7. this.longitude,
  8. this.latitude,
  9. this.errorRange,
  10. this.description,
  11. this.createTime,
  12. this.updateTime,
  13. });
  14. String? id;
  15. String? placeName;
  16. String? placeAlias;
  17. String? creator;
  18. String? longitude;
  19. String? latitude;
  20. int? errorRange;
  21. String? description;
  22. String? createTime;
  23. String? updateTime;
  24. factory WorkplaceInfo.fromJson(Map<String, dynamic> json) => WorkplaceInfo(
  25. id: json["id"],
  26. placeName: json["placeName"],
  27. placeAlias: json["placeAlias"],
  28. creator: json["creator"],
  29. longitude: json["longitude"],
  30. latitude: json["latitude"],
  31. errorRange: json["errorRange"],
  32. description: json["description"],
  33. createTime: json["createTime"],
  34. updateTime: json["updateTime"],
  35. );
  36. Map<String, dynamic> toJson() => {
  37. "id": id,
  38. "placeName": placeName,
  39. "placeAlias": placeAlias,
  40. "creator": creator,
  41. "longitude": longitude,
  42. "latitude": latitude,
  43. "errorRange": errorRange,
  44. "description": description,
  45. "createTime": createTime,
  46. "updateTime": updateTime,
  47. };
  48. }