WGShare.Mobile.Flutter/wgshare/lib/common/models/user_info_detail.dart

279 lines
5.3 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:json_annotation/json_annotation.dart';
part 'user_info_detail.g.dart';
@JsonSerializable(checked: true)
class UserInfoDetail extends Object {
@JsonKey(name: 'Name')
String name;
@JsonKey(name: 'Status')
int status;
@JsonKey(name: 'Mobile')
String? mobile;
@JsonKey(name: 'Account')
String account;
@JsonKey(name: 'UserType')
int userType;
@JsonKey(name: 'SchoolId')
int schoolId;
@JsonKey(name: 'SchoolName')
String? schoolName;
@JsonKey(name: 'Email')
String? email;
@JsonKey(name: 'Id')
int id;
@JsonKey(name: 'RecordIsShow')
bool recordIsShow;
@JsonKey(name: 'LiveIsShow')
bool liveIsShow;
@JsonKey(name: 'FileIsShow')
bool fileIsShow;
@JsonKey(name: 'EquipmentIsShow')
bool equipmentIsShow;
@JsonKey(name: 'DataIsShow')
bool dataIsShow;
@JsonKey(name: 'DataUrl')
String? dataUrl;
@JsonKey(name: 'TaskIsShow')
bool taskIsShow;
@JsonKey(name: 'DataMonitorIsShow')
bool dataMonitorIsShow;
@JsonKey(name: 'GCSLists')
List<GCSLists>? gCSLists;
@JsonKey(name: 'LearnedCoursesNum')
int learnedCoursesNum;
@JsonKey(name: 'RoleAnys')
RoleAnys roleAnys;
@JsonKey(name: 'RoleIsShowMenus')
List<RoleIsShowMenus> roleIsShowMenus;
@JsonKey(name: 'OrgId')
int orgId;
@JsonKey(name: 'IsCanVerify')
bool isCanVerify;
@JsonKey(name: 'StageSubject')
StageSubject? stageSubject;
@JsonKey(name: 'UserOrgList')
List<UserOrgList> userOrgList;
// 蓝牙笔 SN
@JsonKey(name: 'PointPenSn')
String? pointPenSn;
// 蓝牙笔 Mac
@JsonKey(name: 'PointPenMAC')
String? pointPenMac;
UserInfoDetail(
this.name,
this.status,
this.mobile,
this.account,
this.userType,
this.schoolId,
this.schoolName,
this.email,
this.id,
this.recordIsShow,
this.liveIsShow,
this.fileIsShow,
this.equipmentIsShow,
this.dataIsShow,
this.dataUrl,
this.taskIsShow,
this.dataMonitorIsShow,
this.gCSLists,
this.learnedCoursesNum,
this.roleAnys,
this.roleIsShowMenus,
this.orgId,
this.isCanVerify,
this.stageSubject,
this.userOrgList,
this.pointPenSn,
this.pointPenMac,
) {
// 系統如果被非法操作否则不会出现此情况Mac 不会单独存在
if (pointPenSn == null && pointPenMac != null) {
pointPenMac = null;
}
}
factory UserInfoDetail.fromJson(Map<String, dynamic> srcJson) => _$UserInfoDetailFromJson(srcJson);
Map<String, dynamic> toJson() => _$UserInfoDetailToJson(this);
}
@JsonSerializable()
class GCSLists extends Object {
@JsonKey(name: 'Value')
String value;
@JsonKey(name: 'Text')
String? text;
@JsonKey(name: 'GCSLists')
List<GCSLists>? gCSLists;
GCSLists(
this.value,
this.text,
this.gCSLists,
);
factory GCSLists.fromJson(Map<String, dynamic> srcJson) => _$GCSListsFromJson(srcJson);
Map<String, dynamic> toJson() => _$GCSListsToJson(this);
}
@JsonSerializable()
class RoleAnys extends Object {
@JsonKey(name: 'YxIsShow')
bool yxIsShow;
@JsonKey(name: 'HtzxIsShow')
bool htzxIsShow;
@JsonKey(name: 'ZjIsShow')
bool zjIsShow;
@JsonKey(name: 'LjzkIsShow')
bool ljzkIsShow;
@JsonKey(name: 'IsResoure')
bool isResoure;
@JsonKey(name: 'YxNeiBuIsShow')
bool yxNeiBuIsShow;
@JsonKey(name: 'HtNeiBuIsShow')
bool htNeiBuIsShow;
@JsonKey(name: 'ZhongZhiIsShow')
bool zhongZhiIsShow;
@JsonKey(name: 'JSCZIsShow')
bool jSCZIsShow;
@JsonKey(name: 'YLRHYXIsShow')
bool yLRHYXIsShow;
@JsonKey(name: 'CSFZIsShow')
bool cSFZIsShow;
@JsonKey(name: 'YBYXIsShow')
bool yBYXIsShow;
RoleAnys(
this.yxIsShow,
this.htzxIsShow,
this.zjIsShow,
this.ljzkIsShow,
this.isResoure,
this.yxNeiBuIsShow,
this.htNeiBuIsShow,
this.zhongZhiIsShow,
this.jSCZIsShow,
this.yLRHYXIsShow,
this.cSFZIsShow,
this.yBYXIsShow,
);
factory RoleAnys.fromJson(Map<String, dynamic> srcJson) => _$RoleAnysFromJson(srcJson);
Map<String, dynamic> toJson() => _$RoleAnysToJson(this);
}
@JsonSerializable()
class RoleIsShowMenus extends Object {
@JsonKey(name: 'MenuName')
String menuName;
@JsonKey(name: 'MenuUrl')
String menuUrl;
@JsonKey(name: 'Parameter')
String? parameter;
@JsonKey(name: 'Children')
List<dynamic>? children;
RoleIsShowMenus(
this.menuName,
this.menuUrl,
this.parameter,
this.children,
);
factory RoleIsShowMenus.fromJson(Map<String, dynamic> srcJson) => _$RoleIsShowMenusFromJson(srcJson);
Map<String, dynamic> toJson() => _$RoleIsShowMenusToJson(this);
}
@JsonSerializable()
class StageSubject extends Object {
@JsonKey(name: 'StageId')
int stageId;
@JsonKey(name: 'StageName')
String stageName;
@JsonKey(name: 'SubjectId')
int subjectId;
@JsonKey(name: 'SubjectName')
String subjectName;
StageSubject(
this.stageId,
this.stageName,
this.subjectId,
this.subjectName,
);
factory StageSubject.fromJson(Map<String, dynamic> srcJson) => _$StageSubjectFromJson(srcJson);
Map<String, dynamic> toJson() => _$StageSubjectToJson(this);
}
@JsonSerializable()
class UserOrgList extends Object {
@JsonKey(name: 'Id')
int id;
@JsonKey(name: 'Name')
String name;
UserOrgList(
this.id,
this.name,
);
factory UserOrgList.fromJson(Map<String, dynamic> srcJson) => _$UserOrgListFromJson(srcJson);
Map<String, dynamic> toJson() => _$UserOrgListToJson(this);
}