class GetPdResponse {
  Avatar? avatar;
  String? sId;
  String? name;
  String? email;
  String? phone;
  String? role;
  String? uniqueId;
  String? createdAt;
  String? updatedAt;
  int? iV;

  GetPdResponse(
      {this.avatar,
        this.sId,
        this.name,
        this.email,
        this.phone,
        this.role,
        this.uniqueId,
        this.createdAt,
        this.updatedAt,
        this.iV});

  GetPdResponse.fromJson(Map<String, dynamic> json) {
    avatar =
    json['avatar'] != null ? Avatar.fromJson(json['avatar']) : null;
    sId = json['_id'];
    name = json['name'];
    email = json['email'];
    phone = json['phone'];
    role = json['role'];
    uniqueId = json['uniqueId'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    iV = json['__v'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (avatar != null) {
      data['avatar'] = avatar!.toJson();
    }
    data['_id'] = sId;
    data['name'] = name;
    data['email'] = email;
    data['phone'] = phone;
    data['role'] = role;
    data['uniqueId'] = uniqueId;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['__v'] = iV;
    return data;
  }
}

class Avatar {
  String? publicId;
  String? url;

  Avatar({this.publicId, this.url});

  Avatar.fromJson(Map<String, dynamic> json) {
    publicId = json['public_id'];
    url = json['url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['public_id'] = publicId;
    data['url'] = url;
    return data;
  }
}
