continent_entity.dart 593 B

12345678910111213141516171819202122232425
  1. import 'package:fuwei/generated/json/base/json_field.dart';
  2. import 'package:fuwei/generated/json/continent_entity.g.dart';
  3. import 'dart:convert';
  4. ///几大洲
  5. @JsonSerializable()
  6. class ContinentEntity {
  7. late int id;
  8. @JSONField(name: "part_name")
  9. late String partName;
  10. @JSONField(name: "part_code")
  11. late String partCode;
  12. ContinentEntity();
  13. factory ContinentEntity.fromJson(Map<String, dynamic> json) =>
  14. $ContinentEntityFromJson(json);
  15. Map<String, dynamic> toJson() => $ContinentEntityToJson(this);
  16. @override
  17. String toString() {
  18. return jsonEncode(this);
  19. }
  20. }