toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = id;
map['userId'] = userId;
map['password'] = password;
map['username'] = username;
map['superiorName'] = superiorName;
map['workNo'] = workNo;
map['realName'] = realName;
map['mainDeptName'] = mainDeptName;
map['pinYin'] = pinYin;
map['highestEducationSchool'] = highestEducationSchool;
map['positionCategory'] = positionCategory;
map['birthType'] = birthType;
map['sexCategory'] = sexCategory;
map['phone'] = phone;
map['idCard'] = idCard;
map['avatar'] = avatar;
map['remark'] = remark;
map['enableFlag'] = enableFlag;
map['lastLoginTime'] = lastLoginTime;
map['loginTimes'] = loginTimes;
map['isManager'] = isManager;
map['mainPeople'] = mainPeople;
map['tenantId'] = tenantId;
map['tenantName'] = tenantName;
map['token'] = token;
map['deptStructure'] = deptStructure;
map['tenantCount'] = tenantCount;
if (mainDept != null) {
map['mainDept'] = mainDept?.toJson();
}
if (company != null) {
map['company'] = company?.toJson();
}
map['mainDeptId'] = mainDeptId;
if (selfDeptTree != null) {
map['selfDeptTree'] = selfDeptTree?.map((v) => v.toJson()).toList();
}
if (depts != null) {
map['depts'] = depts?.map((v) => v.toJson()).toList();
}
if (allDeptList != null) {
map['allDeptList'] = allDeptList?.map((v) => v.toJson()).toList();
}
if (roles != null) {
map['roles'] = roles?.map((v) => v.toJson()).toList();
}
map['address'] = address;
if (fields != null) {
map['fields'] = fields?.map((v) => v.toJson()).toList();
}
if (fieldValueList != null) {
map['fieldValueList'] = fieldValueList?.map((v) => v.toJson()).toList();
}
map['roleId'] = roleId;
map['officeReceiverFlag'] = officeReceiverFlag;
map['officeReceiverDeptId'] = officeReceiverDeptId;
map['sortNum'] = sortNum;
map['uid'] = uid;
map['superior'] = superior;
map['highestEducation'] = highestEducation;
map['birthDate'] = birthDate;
map['email'] = email;
map['nickName'] = nickName;
map['belongDeptId'] = belongDeptId;
map['roleNames'] = roleNames;
map['isForceUpdatePwd'] = isForceUpdatePwd;
map['expirationDays'] = expirationDays;
map['headshipName'] = headshipName;
// map['currentDeptId'] = currentDeptId;
// map['currentDeptName'] = currentDeptName;
return map;
}