/*
 * @Author: XianKaiQun
 * @Date: 2020-07-24 09:25:13
 * @LastEditors: XianKaiQun
 * @LastEditTime: 2020-07-24 09:25:34
 * @Description: 
 */

class CurrentUserinfoModel {
  String? id;
  String? account;
  String? entCode;
  String? entName;
  String? companyId;
  String? companyName;
  String? organId;
  String? positionId;
  dynamic positionName;
  String? name;
  String? sex;
  String? phone;
  List<EmployeeThirdpartyAuthorizesOfCurrentUserinfoModel>?
      employeeThirdpartyAuthorizes;

  CurrentUserinfoModel({
    this.id,
    this.account,
    this.entCode,
    this.entName,
    this.companyId,
    this.companyName,
    this.organId,
    this.positionId,
    this.positionName,
    this.name,
    this.sex,
    this.phone,
    this.employeeThirdpartyAuthorizes,
  });

  CurrentUserinfoModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    id = map['id'];
    account = map['account'];
    entCode = map['entCode'];
    entName = map['entName'];
    companyId = map['companyId'];
    companyName = map['companyName'];
    organId = map['organId'];
    positionId = map['positionId'];
    positionName = map['positionName'];
    name = map['name'];
    sex = map['sex'];
    phone = map['phone'];
    employeeThirdpartyAuthorizes =
        List<EmployeeThirdpartyAuthorizesOfCurrentUserinfoModel>.from(
            (map["employeeThirdpartyAuthorizes"] ?? []).map((x) =>
                EmployeeThirdpartyAuthorizesOfCurrentUserinfoModel.fromJson(
                    x)));
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['id'] = this.id;
    json['account'] = this.account;
    json['entCode'] = this.entCode;
    json['entName'] = this.entName;
    json['companyId'] = this.companyId;
    json['companyName'] = this.companyName;
    json['organId'] = this.organId;
    json['positionId'] = this.positionId;
    json['positionName'] = this.positionName;
    json['name'] = this.name;
    json['sex'] = this.sex;
    json['phone'] = this.phone;
    json['employeeThirdpartyAuthorizes'] = List<dynamic>.from(
        (employeeThirdpartyAuthorizes ?? []).map((x) => x.toJson()));

    return json;
  }
}

class EmployeeThirdpartyAuthorizesOfCurrentUserinfoModel {
  String? id;
  String? employeeId;
  String? thirdpartyId;
  String? unionId;
  String? openId;
  String? headPortrait;
  String? nickname;
  String? createAt;

  EmployeeThirdpartyAuthorizesOfCurrentUserinfoModel({
    this.id,
    this.employeeId,
    this.thirdpartyId,
    this.unionId,
    this.openId,
    this.headPortrait,
    this.nickname,
    this.createAt,
  });

  EmployeeThirdpartyAuthorizesOfCurrentUserinfoModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    id = map['id'];
    employeeId = map['employeeId'];
    thirdpartyId = map['thirdpartyId'];
    unionId = map['unionId'];
    openId = map['openId'];
    headPortrait = map['headPortrait'];
    nickname = map['nickname'];
    createAt = map['createAt'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['id'] = this.id;
    json['employeeId'] = this.employeeId;
    json['thirdpartyId'] = this.thirdpartyId;
    json['unionId'] = this.unionId;
    json['openId'] = this.openId;
    json['headPortrait'] = this.headPortrait;
    json['nickname'] = this.nickname;
    json['createAt'] = this.createAt;

    return json;
  }
}
