54 lines
1.3 KiB
Dart
54 lines
1.3 KiB
Dart
class UserModel {
|
|
int id;
|
|
String updateTime;
|
|
String departmentId;
|
|
String name;
|
|
int passwordV;
|
|
String nickName;
|
|
String headImg;
|
|
String phone;
|
|
String email;
|
|
int status;
|
|
String remark;
|
|
String orgCode;
|
|
String title;
|
|
String titleImg;
|
|
String username;
|
|
UserModel({
|
|
required this.name,
|
|
required this.departmentId,
|
|
required this.email,
|
|
required this.headImg,
|
|
required this.nickName,
|
|
required this.phone,
|
|
required this.title,
|
|
required this.titleImg,
|
|
required this.id,
|
|
required this.updateTime,
|
|
required this.orgCode,
|
|
required this.status,
|
|
required this.passwordV,
|
|
required this.remark,
|
|
required this.username,
|
|
});
|
|
factory UserModel.fromJson(Map<dynamic, dynamic> data) {
|
|
return UserModel(
|
|
name: data['name'],
|
|
departmentId: data['departmentId'],
|
|
email: data['email'] ?? "",
|
|
headImg: data['headImg'] ?? "",
|
|
nickName: data['nickName'] ?? "",
|
|
passwordV: data['passwordV'],
|
|
phone: data['phone'] ?? "",
|
|
title: data['title'] ?? "",
|
|
titleImg: data['title_img'] ?? "",
|
|
id: data['id'],
|
|
updateTime: data['updateTime'],
|
|
orgCode: data['org_code'],
|
|
status: data['status'],
|
|
remark: data['remark'] ?? "",
|
|
username: data['username'],
|
|
);
|
|
}
|
|
}
|