deviceInfoDB.m.dart 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. import 'device.m.dart';
  2. import 'adminDB.m.dart';
  3. import 'authentication.m.dart';
  4. import 'user.m.dart';
  5. class CreateDictionaryItemDBRequest extends TableDataItem<DictionaryDTO>{
  6. DictionaryDTO? ;
  7. CreateDictionaryItemDBRequest({
  8. this.,
  9. Map<String,String>? platformDatas,
  10. String? extensionData,
  11. }) : super(
  12. data: data,
  13. platformDatas: platformDatas,
  14. extensionData: extensionData,
  15. );
  16. factory CreateDictionaryItemDBRequest.fromJson(Map<String, dynamic> map) {
  17. return CreateDictionaryItemDBRequest(
  18. : map[''],
  19. platformDatas: map['PlatformDatas'] != null ? map['PlatformDatas'].cast<String,String>() : null,
  20. extensionData: map['ExtensionData'],
  21. );
  22. }
  23. Map<String, dynamic> toJson() {
  24. final map = super.toJson();
  25. if( != null)
  26. map[''] = ;
  27. return map;
  28. }
  29. }
  30. class RemoveDictionaryItemDBRequest {
  31. String? code;
  32. RemoveDictionaryItemDBRequest({
  33. this.code,
  34. });
  35. factory RemoveDictionaryItemDBRequest.fromJson(Map<String, dynamic> map) {
  36. return RemoveDictionaryItemDBRequest(
  37. code: map['Code'],
  38. );
  39. }
  40. Map<String, dynamic> toJson() {
  41. final map = Map<String, dynamic>();
  42. if(code != null)
  43. map['Code'] = code;
  44. return map;
  45. }
  46. }
  47. class FindDictionaryItemsDBRequest {
  48. int dictionaryType;
  49. String? parentCode;
  50. FindDictionaryItemsDBRequest({
  51. this.dictionaryType = 0,
  52. this.parentCode,
  53. });
  54. factory FindDictionaryItemsDBRequest.fromJson(Map<String, dynamic> map) {
  55. return FindDictionaryItemsDBRequest(
  56. dictionaryType: map['DictionaryType'],
  57. parentCode: map['ParentCode'],
  58. );
  59. }
  60. Map<String, dynamic> toJson() {
  61. final map = Map<String, dynamic>();
  62. map['DictionaryType'] = dictionaryType;
  63. if(parentCode != null)
  64. map['ParentCode'] = parentCode;
  65. return map;
  66. }
  67. }
  68. class CreateDeviceInfoDBRequest extends TableDataItem<DeviceInfoDTO>{
  69. DeviceInfoDTO? ;
  70. CreateDeviceInfoDBRequest({
  71. this.,
  72. Map<String,String>? platformDatas,
  73. String? extensionData,
  74. }) : super(
  75. data: data,
  76. platformDatas: platformDatas,
  77. extensionData: extensionData,
  78. );
  79. factory CreateDeviceInfoDBRequest.fromJson(Map<String, dynamic> map) {
  80. return CreateDeviceInfoDBRequest(
  81. : map[''],
  82. platformDatas: map['PlatformDatas'] != null ? map['PlatformDatas'].cast<String,String>() : null,
  83. extensionData: map['ExtensionData'],
  84. );
  85. }
  86. Map<String, dynamic> toJson() {
  87. final map = super.toJson();
  88. if( != null)
  89. map[''] = ;
  90. return map;
  91. }
  92. }
  93. class ManageDeviceInfoDTO extends DeviceInfoDTO{
  94. String? hospitalName;
  95. String? directorName;
  96. String? adminName;
  97. String? shareUserNum;
  98. String? deviceModelName;
  99. String? deviceTypeName;
  100. ManageDeviceInfoDTO({
  101. this.hospitalName,
  102. this.directorName,
  103. this.adminName,
  104. this.shareUserNum,
  105. this.deviceModelName,
  106. this.deviceTypeName,
  107. String? deviceCode,
  108. String? serialNumber,
  109. String? name,
  110. String? description,
  111. String? deviceModel,
  112. String? deviceType,
  113. String? headPicUrl,
  114. String? deviceSoftwareVersion,
  115. String? sDKSoftwareVersion,
  116. String? organizationCode,
  117. String? shortCode,
  118. bool isAutoShared = false,
  119. DateTime? createTime,
  120. DateTime? updateTime,
  121. }) : super(
  122. deviceCode: deviceCode,
  123. serialNumber: serialNumber,
  124. name: name,
  125. description: description,
  126. deviceModel: deviceModel,
  127. deviceType: deviceType,
  128. headPicUrl: headPicUrl,
  129. deviceSoftwareVersion: deviceSoftwareVersion,
  130. sDKSoftwareVersion: sDKSoftwareVersion,
  131. organizationCode: organizationCode,
  132. shortCode: shortCode,
  133. isAutoShared: isAutoShared,
  134. createTime: createTime,
  135. updateTime: updateTime,
  136. );
  137. factory ManageDeviceInfoDTO.fromJson(Map<String, dynamic> map) {
  138. return ManageDeviceInfoDTO(
  139. hospitalName: map['HospitalName'],
  140. directorName: map['DirectorName'],
  141. adminName: map['AdminName'],
  142. shareUserNum: map['ShareUserNum'],
  143. deviceModelName: map['DeviceModelName'],
  144. deviceTypeName: map['DeviceTypeName'],
  145. deviceCode: map['DeviceCode'],
  146. serialNumber: map['SerialNumber'],
  147. name: map['Name'],
  148. description: map['Description'],
  149. deviceModel: map['DeviceModel'],
  150. deviceType: map['DeviceType'],
  151. headPicUrl: map['HeadPicUrl'],
  152. deviceSoftwareVersion: map['DeviceSoftwareVersion'],
  153. sDKSoftwareVersion: map['SDKSoftwareVersion'],
  154. organizationCode: map['OrganizationCode'],
  155. shortCode: map['ShortCode'],
  156. isAutoShared: map['IsAutoShared'],
  157. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  158. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  159. );
  160. }
  161. Map<String, dynamic> toJson() {
  162. final map = super.toJson();
  163. if(hospitalName != null)
  164. map['HospitalName'] = hospitalName;
  165. if(directorName != null)
  166. map['DirectorName'] = directorName;
  167. if(adminName != null)
  168. map['AdminName'] = adminName;
  169. if(shareUserNum != null)
  170. map['ShareUserNum'] = shareUserNum;
  171. if(deviceModelName != null)
  172. map['DeviceModelName'] = deviceModelName;
  173. if(deviceTypeName != null)
  174. map['DeviceTypeName'] = deviceTypeName;
  175. return map;
  176. }
  177. }
  178. class GetDevicePagesRequest extends PageRequest{
  179. String? queryType;
  180. String? keyword;
  181. String? hospital;
  182. String? adminName;
  183. String? userName;
  184. GetDevicePagesRequest({
  185. this.queryType,
  186. this.keyword,
  187. this.hospital,
  188. this.adminName,
  189. this.userName,
  190. int pageIndex = 0,
  191. int pageSize = 0,
  192. String? token,
  193. }) : super(
  194. pageIndex: pageIndex,
  195. pageSize: pageSize,
  196. token: token,
  197. );
  198. factory GetDevicePagesRequest.fromJson(Map<String, dynamic> map) {
  199. return GetDevicePagesRequest(
  200. queryType: map['QueryType'],
  201. keyword: map['Keyword'],
  202. hospital: map['Hospital'],
  203. adminName: map['AdminName'],
  204. userName: map['UserName'],
  205. pageIndex: map['PageIndex'],
  206. pageSize: map['PageSize'],
  207. token: map['Token'],
  208. );
  209. }
  210. Map<String, dynamic> toJson() {
  211. final map = super.toJson();
  212. if(queryType != null)
  213. map['QueryType'] = queryType;
  214. if(keyword != null)
  215. map['Keyword'] = keyword;
  216. if(hospital != null)
  217. map['Hospital'] = hospital;
  218. if(adminName != null)
  219. map['AdminName'] = adminName;
  220. if(userName != null)
  221. map['UserName'] = userName;
  222. return map;
  223. }
  224. }