dict_rsp.dart 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import 'package:json_annotation/json_annotation.dart';
  2. import '../num_converter.dart';
  3. import '../string_converter.dart';
  4. part 'dict_rsp.g.dart';
  5. /// 字典
  6. @JsonSerializable(converters: [NumConverter(), StringConverter()])
  7. class DictRsp {
  8. final String? dictType; //字典类型
  9. final String? value; //字典键值
  10. final String? label; //字典标签
  11. const DictRsp({
  12. this.dictType,
  13. this.value,
  14. this.label,
  15. });
  16. factory DictRsp.fromJson(Map<String, dynamic> json) => _$DictRspFromJson(json);
  17. Map<String, dynamic> toJson() => _$DictRspToJson(this);
  18. }
  19. /// 土壤信息
  20. @JsonSerializable(converters: [NumConverter(), StringConverter()])
  21. class TrxxRsp {
  22. /// ID
  23. final num? id;
  24. /// 土类名称
  25. final String? tlmc;
  26. /// 土类编码
  27. final String? tlbmCode;
  28. const TrxxRsp({
  29. this.id,
  30. this.tlmc,
  31. this.tlbmCode,
  32. });
  33. factory TrxxRsp.fromJson(Map<String, dynamic> json) => _$TrxxRspFromJson(json);
  34. Map<String, dynamic> toJson() => _$TrxxRspToJson(this);
  35. }
  36. /// 粮食信息
  37. @JsonSerializable(converters: [NumConverter(), StringConverter()])
  38. class LsxxRsp {
  39. /// ID
  40. final num? id;
  41. /// 细类名称
  42. final String? xilmc;
  43. /// 细类编码
  44. final String? xilbmCode;
  45. const LsxxRsp({
  46. this.id,
  47. this.xilmc,
  48. this.xilbmCode,
  49. });
  50. factory LsxxRsp.fromJson(Map<String, dynamic> json) => _$LsxxRspFromJson(json);
  51. Map<String, dynamic> toJson() => _$LsxxRspToJson(this);
  52. }