123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250 |
- import 'device.m.dart';
- import 'adminDB.m.dart';
- import 'authentication.m.dart';
- import 'user.m.dart';
- class CreateDictionaryItemDBRequest extends TableDataItem<DictionaryDTO>{
- DictionaryDTO? ;
- CreateDictionaryItemDBRequest({
- this.,
- Map<String,String>? platformDatas,
- String? extensionData,
- }) : super(
- data: data,
- platformDatas: platformDatas,
- extensionData: extensionData,
- );
- factory CreateDictionaryItemDBRequest.fromJson(Map<String, dynamic> map) {
- return CreateDictionaryItemDBRequest(
- : map[''],
- platformDatas: map['PlatformDatas'] != null ? map['PlatformDatas'].cast<String,String>() : null,
- extensionData: map['ExtensionData'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if( != null)
- map[''] = ;
- return map;
- }
- }
- class RemoveDictionaryItemDBRequest {
- String? code;
- RemoveDictionaryItemDBRequest({
- this.code,
- });
- factory RemoveDictionaryItemDBRequest.fromJson(Map<String, dynamic> map) {
- return RemoveDictionaryItemDBRequest(
- code: map['Code'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- if(code != null)
- map['Code'] = code;
- return map;
- }
- }
- class FindDictionaryItemsDBRequest {
- int dictionaryType;
- String? parentCode;
- FindDictionaryItemsDBRequest({
- this.dictionaryType = 0,
- this.parentCode,
- });
- factory FindDictionaryItemsDBRequest.fromJson(Map<String, dynamic> map) {
- return FindDictionaryItemsDBRequest(
- dictionaryType: map['DictionaryType'],
- parentCode: map['ParentCode'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = Map<String, dynamic>();
- map['DictionaryType'] = dictionaryType;
- if(parentCode != null)
- map['ParentCode'] = parentCode;
- return map;
- }
- }
- class CreateDeviceInfoDBRequest extends TableDataItem<DeviceInfoDTO>{
- DeviceInfoDTO? ;
- CreateDeviceInfoDBRequest({
- this.,
- Map<String,String>? platformDatas,
- String? extensionData,
- }) : super(
- data: data,
- platformDatas: platformDatas,
- extensionData: extensionData,
- );
- factory CreateDeviceInfoDBRequest.fromJson(Map<String, dynamic> map) {
- return CreateDeviceInfoDBRequest(
- : map[''],
- platformDatas: map['PlatformDatas'] != null ? map['PlatformDatas'].cast<String,String>() : null,
- extensionData: map['ExtensionData'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if( != null)
- map[''] = ;
- return map;
- }
- }
- class ManageDeviceInfoDTO extends DeviceInfoDTO{
- String? hospitalName;
- String? directorName;
- String? adminName;
- String? shareUserNum;
- String? deviceModelName;
- String? deviceTypeName;
- ManageDeviceInfoDTO({
- this.hospitalName,
- this.directorName,
- this.adminName,
- this.shareUserNum,
- this.deviceModelName,
- this.deviceTypeName,
- String? deviceCode,
- String? serialNumber,
- String? name,
- String? description,
- String? deviceModel,
- String? deviceType,
- String? headPicUrl,
- String? deviceSoftwareVersion,
- String? sDKSoftwareVersion,
- String? organizationCode,
- String? shortCode,
- bool isAutoShared = false,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- deviceCode: deviceCode,
- serialNumber: serialNumber,
- name: name,
- description: description,
- deviceModel: deviceModel,
- deviceType: deviceType,
- headPicUrl: headPicUrl,
- deviceSoftwareVersion: deviceSoftwareVersion,
- sDKSoftwareVersion: sDKSoftwareVersion,
- organizationCode: organizationCode,
- shortCode: shortCode,
- isAutoShared: isAutoShared,
- createTime: createTime,
- updateTime: updateTime,
- );
- factory ManageDeviceInfoDTO.fromJson(Map<String, dynamic> map) {
- return ManageDeviceInfoDTO(
- hospitalName: map['HospitalName'],
- directorName: map['DirectorName'],
- adminName: map['AdminName'],
- shareUserNum: map['ShareUserNum'],
- deviceModelName: map['DeviceModelName'],
- deviceTypeName: map['DeviceTypeName'],
- deviceCode: map['DeviceCode'],
- serialNumber: map['SerialNumber'],
- name: map['Name'],
- description: map['Description'],
- deviceModel: map['DeviceModel'],
- deviceType: map['DeviceType'],
- headPicUrl: map['HeadPicUrl'],
- deviceSoftwareVersion: map['DeviceSoftwareVersion'],
- sDKSoftwareVersion: map['SDKSoftwareVersion'],
- organizationCode: map['OrganizationCode'],
- shortCode: map['ShortCode'],
- isAutoShared: map['IsAutoShared'],
- createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
- updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(hospitalName != null)
- map['HospitalName'] = hospitalName;
- if(directorName != null)
- map['DirectorName'] = directorName;
- if(adminName != null)
- map['AdminName'] = adminName;
- if(shareUserNum != null)
- map['ShareUserNum'] = shareUserNum;
- if(deviceModelName != null)
- map['DeviceModelName'] = deviceModelName;
- if(deviceTypeName != null)
- map['DeviceTypeName'] = deviceTypeName;
- return map;
- }
- }
- class GetDevicePagesRequest extends PageRequest{
- String? queryType;
- String? keyword;
- String? hospital;
- String? adminName;
- String? userName;
- GetDevicePagesRequest({
- this.queryType,
- this.keyword,
- this.hospital,
- this.adminName,
- this.userName,
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory GetDevicePagesRequest.fromJson(Map<String, dynamic> map) {
- return GetDevicePagesRequest(
- queryType: map['QueryType'],
- keyword: map['Keyword'],
- hospital: map['Hospital'],
- adminName: map['AdminName'],
- userName: map['UserName'],
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if(queryType != null)
- map['QueryType'] = queryType;
- if(keyword != null)
- map['Keyword'] = keyword;
- if(hospital != null)
- map['Hospital'] = hospital;
- if(adminName != null)
- map['AdminName'] = adminName;
- if(userName != null)
- map['UserName'] = userName;
- return map;
- }
- }
|