id_name_entity.dart 513 B

123456789101112131415161718192021
  1. import 'package:domain/generated/json/base/json_field.dart';
  2. import 'package:domain/generated/json/id_name_entity.g.dart';
  3. import 'dart:convert';
  4. export 'package:domain/generated/json/id_name_entity.g.dart';
  5. @JsonSerializable()
  6. class IdNameEntity {
  7. String? id;
  8. String? name;
  9. IdNameEntity();
  10. factory IdNameEntity.fromJson(Map<String, dynamic> json) => $IdNameEntityFromJson(json);
  11. Map<String, dynamic> toJson() => $IdNameEntityToJson(this);
  12. @override
  13. String toString() {
  14. return jsonEncode(this);
  15. }
  16. }