login_entity.dart 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. class LoginEntity {
  2. String? msg;
  3. int? code;
  4. Data? data;
  5. LoginEntity({this.msg, this.code, this.data});
  6. LoginEntity.fromJson(Map<String, dynamic> json) {
  7. msg = json['msg'];
  8. code = json['code'];
  9. data = json['data'] != null ? new Data.fromJson(json['data']) : null;
  10. }
  11. Map<String, dynamic> toJson() {
  12. final Map<String, dynamic> data = new Map<String, dynamic>();
  13. data['msg'] = this.msg;
  14. data['code'] = this.code;
  15. if (this.data != null) {
  16. data['data'] = this.data!.toJson();
  17. }
  18. return data;
  19. }
  20. }
  21. class Data {
  22. String? phoneNumber;
  23. String? identificationCard;
  24. String? id;
  25. String? token;
  26. String? avatar;
  27. Data({this.phoneNumber, this.identificationCard, this.id, this.token,this.avatar});
  28. Data.fromJson(Map<String, dynamic> json) {
  29. phoneNumber = json['phoneNumber'];
  30. identificationCard = json['identificationCard'];
  31. id = json['id'];
  32. token = json['token'];
  33. avatar = json['avatar'];
  34. }
  35. Map<String, dynamic> toJson() {
  36. final Map<String, dynamic> data = <String, dynamic>{};
  37. data['phoneNumber'] = phoneNumber;
  38. data['identificationCard'] = identificationCard;
  39. data['id'] = id;
  40. data['token'] = token;
  41. data['avatar'] = avatar;
  42. return data;
  43. }
  44. }