json_convert_content.dart 55 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961
  1. // ignore_for_file: non_constant_identifier_names
  2. // ignore_for_file: camel_case_types
  3. // ignore_for_file: prefer_single_quotes
  4. // This file is automatically generated. DO NOT EDIT, all your changes would be lost.
  5. import 'package:flutter/material.dart' show debugPrint;
  6. import 'package:domain/entity/response/add_edit_revise_view_s_g_entity.dart';
  7. import 'package:domain/entity/response/agency_detail_entity.dart';
  8. import 'package:domain/entity/response/agency_option_entity.dart';
  9. import 'package:domain/entity/response/agency_table_entity.dart';
  10. import 'package:domain/entity/response/attendance_entity.dart';
  11. import 'package:domain/entity/response/attendance_review_entity.dart';
  12. import 'package:domain/entity/response/check_success_entity.dart';
  13. import 'package:domain/entity/response/contract_detail_entity.dart';
  14. import 'package:domain/entity/response/contract_option_entity.dart';
  15. import 'package:domain/entity/response/contract_position_add_option_entity.dart';
  16. import 'package:domain/entity/response/contract_position_option_entity.dart';
  17. import 'package:domain/entity/response/contract_position_rate_detail_entity.dart';
  18. import 'package:domain/entity/response/contract_position_rate_specific_option_entity.dart';
  19. import 'package:domain/entity/response/contract_position_rate_table_entity.dart';
  20. import 'package:domain/entity/response/contract_position_table_entity.dart';
  21. import 'package:domain/entity/response/contract_table_entity.dart';
  22. import 'package:domain/entity/response/device_list_entity.dart';
  23. import 'package:domain/entity/response/fiance_report_entity.dart';
  24. import 'package:domain/entity/response/hotel_info_entity.dart';
  25. import 'package:domain/entity/response/id_name_entity.dart';
  26. import 'package:domain/entity/response/index_option_entity.dart';
  27. import 'package:domain/entity/response/job_applied_edit_index_s_g_entity.dart';
  28. import 'package:domain/entity/response/job_applied_index_s_g_entity.dart';
  29. import 'package:domain/entity/response/job_applied_list_s_g_entity.dart';
  30. import 'package:domain/entity/response/job_applied_remark_view_s_g_entity.dart';
  31. import 'package:domain/entity/response/job_applied_staff_s_g_entity.dart';
  32. import 'package:domain/entity/response/job_list_add_staff_entity.dart';
  33. import 'package:domain/entity/response/job_list_applied_edit_entity.dart';
  34. import 'package:domain/entity/response/job_list_applied_info_entity.dart';
  35. import 'package:domain/entity/response/job_list_applied_staff_list_entity.dart';
  36. import 'package:domain/entity/response/job_list_applied_staff_search_entity.dart';
  37. import 'package:domain/entity/response/job_list_applied_work_flow_entity.dart';
  38. import 'package:domain/entity/response/job_list_detail_entity.dart';
  39. import 'package:domain/entity/response/job_list_edit_index_s_g_entity.dart';
  40. import 'package:domain/entity/response/job_list_entity.dart';
  41. import 'package:domain/entity/response/job_list_index_entity.dart';
  42. import 'package:domain/entity/response/job_list_index_s_g_entity.dart';
  43. import 'package:domain/entity/response/job_list_remark_view_entity.dart';
  44. import 'package:domain/entity/response/job_list_s_g_entity.dart';
  45. import 'package:domain/entity/response/job_template_edit_index_entity.dart';
  46. import 'package:domain/entity/response/job_template_s_g_entity.dart';
  47. import 'package:domain/entity/response/job_title_edit_index_entity.dart';
  48. import 'package:domain/entity/response/job_title_s_g_entity.dart';
  49. import 'package:domain/entity/response/labour_report_entity.dart';
  50. import 'package:domain/entity/response/labour_report_v_n_entity.dart';
  51. import 'package:domain/entity/response/labour_request_edit_index_entity.dart';
  52. import 'package:domain/entity/response/labour_request_index_entity.dart';
  53. import 'package:domain/entity/response/labour_request_list_entity.dart';
  54. import 'package:domain/entity/response/labour_request_work_flow_entity.dart';
  55. import 'package:domain/entity/response/labour_review_list_entity.dart';
  56. import 'package:domain/entity/response/labour_review_status_entity.dart';
  57. import 'package:domain/entity/response/position_table_entity.dart';
  58. import 'package:domain/entity/response/revise_index_s_g_entity.dart';
  59. import 'package:domain/entity/response/revise_list_s_g_entity.dart';
  60. import 'package:domain/entity/response/revise_log_s_g_entity.dart';
  61. import 'package:domain/entity/response/s_g_attendance_review_option_entity.dart';
  62. import 'package:domain/entity/response/s_g_attendance_review_table_entity.dart';
  63. import 'package:domain/entity/response/s_g_attendance_review_workflow_entity.dart';
  64. import 'package:domain/entity/response/s_g_dashboard_entity.dart';
  65. import 'package:domain/entity/response/s_g_labour_request_add_option_entity.dart';
  66. import 'package:domain/entity/response/s_g_labour_request_detail_entity.dart';
  67. import 'package:domain/entity/response/s_g_labour_request_option_entity.dart';
  68. import 'package:domain/entity/response/s_g_labour_request_table_entity.dart';
  69. import 'package:domain/entity/response/s_g_labour_request_worl_flow_entity.dart';
  70. import 'package:domain/entity/response/s_g_labour_review_option_entity.dart';
  71. import 'package:domain/entity/response/s_g_labour_review_table_entity.dart';
  72. import 'package:domain/entity/response/sign_in_sign_out_entity.dart';
  73. import 'package:domain/entity/response/staff_detail_entity.dart';
  74. import 'package:domain/entity/response/staff_detail_s_g_entity.dart';
  75. import 'package:domain/entity/response/staff_job_history_s_g_entity.dart';
  76. import 'package:domain/entity/response/staff_labour_history_entity.dart';
  77. import 'package:domain/entity/response/staff_remark_history_entity.dart';
  78. import 'package:domain/entity/response/staff_report_v_n_entity.dart';
  79. import 'package:domain/entity/response/staff_request_report_entity.dart';
  80. import 'package:domain/entity/response/staff_review_history_s_g_entity.dart';
  81. import 'package:domain/entity/response/switch_project_entity.dart';
  82. import 'package:domain/entity/response/u_k_attendance_entity.dart';
  83. import 'package:domain/entity/response/u_k_report_attendance_entity.dart';
  84. import 'package:domain/entity/response/u_k_report_labour_entity.dart';
  85. import 'package:domain/entity/response/u_k_report_working_hours_entity.dart';
  86. import 'package:domain/entity/response/u_k_security_attendance_entity.dart';
  87. import 'package:domain/entity/response/u_k_security_attendance_option_entity.dart';
  88. import 'package:domain/entity/response/u_k_template_detail_entity.dart';
  89. import 'package:domain/entity/response/u_k_template_entity.dart';
  90. import 'package:domain/entity/server_time.dart';
  91. JsonConvert jsonConvert = JsonConvert();
  92. typedef JsonConvertFunction<T> = T Function(Map<String, dynamic> json);
  93. typedef EnumConvertFunction<T> = T Function(String value);
  94. typedef ConvertExceptionHandler = void Function(Object error, StackTrace stackTrace);
  95. extension MapSafeExt<K, V> on Map<K, V> {
  96. T? getOrNull<T>(K? key) {
  97. if (!containsKey(key) || key == null) {
  98. return null;
  99. } else {
  100. return this[key] as T?;
  101. }
  102. }
  103. }
  104. class JsonConvert {
  105. static ConvertExceptionHandler? onError;
  106. JsonConvertClassCollection convertFuncMap = JsonConvertClassCollection();
  107. /// When you are in the development, to generate a new model class, hot-reload doesn't find new generation model class, you can build on MaterialApp method called jsonConvert. ReassembleConvertFuncMap (); This method only works in a development environment
  108. /// https://flutter.cn/docs/development/tools/hot-reload
  109. /// class MyApp extends StatelessWidget {
  110. /// const MyApp({Key? key})
  111. /// : super(key: key);
  112. ///
  113. /// @override
  114. /// Widget build(BuildContext context) {
  115. /// jsonConvert.reassembleConvertFuncMap();
  116. /// return MaterialApp();
  117. /// }
  118. /// }
  119. void reassembleConvertFuncMap() {
  120. bool isReleaseMode = const bool.fromEnvironment('dart.vm.product');
  121. if (!isReleaseMode) {
  122. convertFuncMap = JsonConvertClassCollection();
  123. }
  124. }
  125. T? convert<T>(dynamic value, {EnumConvertFunction? enumConvert}) {
  126. if (value == null) {
  127. return null;
  128. }
  129. if (value is T) {
  130. return value;
  131. }
  132. try {
  133. return _asT<T>(value, enumConvert: enumConvert);
  134. } catch (e, stackTrace) {
  135. debugPrint('asT<$T> $e $stackTrace');
  136. if (onError != null) {
  137. onError!(e, stackTrace);
  138. }
  139. return null;
  140. }
  141. }
  142. List<T?>? convertList<T>(List<dynamic>? value, {EnumConvertFunction? enumConvert}) {
  143. if (value == null) {
  144. return null;
  145. }
  146. try {
  147. return value.map((dynamic e) => _asT<T>(e, enumConvert: enumConvert)).toList();
  148. } catch (e, stackTrace) {
  149. debugPrint('asT<$T> $e $stackTrace');
  150. if (onError != null) {
  151. onError!(e, stackTrace);
  152. }
  153. return <T>[];
  154. }
  155. }
  156. List<T>? convertListNotNull<T>(dynamic value, {EnumConvertFunction? enumConvert}) {
  157. if (value == null) {
  158. return null;
  159. }
  160. try {
  161. return (value as List<dynamic>).map((dynamic e) => _asT<T>(e, enumConvert: enumConvert)!).toList();
  162. } catch (e, stackTrace) {
  163. debugPrint('asT<$T> $e $stackTrace');
  164. if (onError != null) {
  165. onError!(e, stackTrace);
  166. }
  167. return <T>[];
  168. }
  169. }
  170. T? _asT<T extends Object?>(dynamic value,
  171. {EnumConvertFunction? enumConvert}) {
  172. final String type = T.toString();
  173. final String valueS = value.toString();
  174. if (enumConvert != null) {
  175. return enumConvert(valueS) as T;
  176. } else if (type == "String") {
  177. return valueS as T;
  178. } else if (type == "int") {
  179. final int? intValue = int.tryParse(valueS);
  180. if (intValue == null) {
  181. return double.tryParse(valueS)?.toInt() as T?;
  182. } else {
  183. return intValue as T;
  184. }
  185. } else if (type == "double") {
  186. return double.parse(valueS) as T;
  187. } else if (type == "DateTime") {
  188. return DateTime.parse(valueS) as T;
  189. } else if (type == "bool") {
  190. if (valueS == '0' || valueS == '1') {
  191. return (valueS == '1') as T;
  192. }
  193. return (valueS == 'true') as T;
  194. } else if (type == "Map" || type.startsWith("Map<")) {
  195. return value as T;
  196. } else {
  197. if (convertFuncMap.containsKey(type)) {
  198. if (value == null) {
  199. return null;
  200. }
  201. var covertFunc = convertFuncMap[type]!;
  202. if (covertFunc is Map<String, dynamic>) {
  203. return covertFunc(value as Map<String, dynamic>) as T;
  204. } else {
  205. return covertFunc(Map<String, dynamic>.from(value)) as T;
  206. }
  207. } else {
  208. throw UnimplementedError('$type unimplemented,you can try running the app again');
  209. }
  210. }
  211. }
  212. //list is returned by type
  213. static M? _getListChildType<M>(List<Map<String, dynamic>> data) {
  214. if (<AddEditReviseViewSGEntity>[] is M) {
  215. return data.map<AddEditReviseViewSGEntity>((Map<String, dynamic> e) => AddEditReviseViewSGEntity.fromJson(e)).toList() as M;
  216. }
  217. if (<AgencyDetailEntity>[] is M) {
  218. return data.map<AgencyDetailEntity>((Map<String, dynamic> e) => AgencyDetailEntity.fromJson(e)).toList() as M;
  219. }
  220. if (<AgencyDetailPivot>[] is M) {
  221. return data.map<AgencyDetailPivot>((Map<String, dynamic> e) => AgencyDetailPivot.fromJson(e)).toList() as M;
  222. }
  223. if (<AgencyOptionEntity>[] is M) {
  224. return data.map<AgencyOptionEntity>((Map<String, dynamic> e) => AgencyOptionEntity.fromJson(e)).toList() as M;
  225. }
  226. if (<AgencyTableEntity>[] is M) {
  227. return data.map<AgencyTableEntity>((Map<String, dynamic> e) => AgencyTableEntity.fromJson(e)).toList() as M;
  228. }
  229. if (<AgencyTableRows>[] is M) {
  230. return data.map<AgencyTableRows>((Map<String, dynamic> e) => AgencyTableRows.fromJson(e)).toList() as M;
  231. }
  232. if (<AttendanceEntity>[] is M) {
  233. return data.map<AttendanceEntity>((Map<String, dynamic> e) => AttendanceEntity.fromJson(e)).toList() as M;
  234. }
  235. if (<AttendanceList>[] is M) {
  236. return data.map<AttendanceList>((Map<String, dynamic> e) => AttendanceList.fromJson(e)).toList() as M;
  237. }
  238. if (<AttendanceReviewEntity>[] is M) {
  239. return data.map<AttendanceReviewEntity>((Map<String, dynamic> e) => AttendanceReviewEntity.fromJson(e)).toList() as M;
  240. }
  241. if (<AttendanceReviewRows>[] is M) {
  242. return data.map<AttendanceReviewRows>((Map<String, dynamic> e) => AttendanceReviewRows.fromJson(e)).toList() as M;
  243. }
  244. if (<CheckSuccessEntity>[] is M) {
  245. return data.map<CheckSuccessEntity>((Map<String, dynamic> e) => CheckSuccessEntity.fromJson(e)).toList() as M;
  246. }
  247. if (<ContractDetailEntity>[] is M) {
  248. return data.map<ContractDetailEntity>((Map<String, dynamic> e) => ContractDetailEntity.fromJson(e)).toList() as M;
  249. }
  250. if (<ContractDetailRow>[] is M) {
  251. return data.map<ContractDetailRow>((Map<String, dynamic> e) => ContractDetailRow.fromJson(e)).toList() as M;
  252. }
  253. if (<ContractOptionEntity>[] is M) {
  254. return data.map<ContractOptionEntity>((Map<String, dynamic> e) => ContractOptionEntity.fromJson(e)).toList() as M;
  255. }
  256. if (<ContractPositionAddOptionEntity>[] is M) {
  257. return data.map<ContractPositionAddOptionEntity>((Map<String, dynamic> e) => ContractPositionAddOptionEntity.fromJson(e)).toList() as M;
  258. }
  259. if (<ContractPositionOptionEntity>[] is M) {
  260. return data.map<ContractPositionOptionEntity>((Map<String, dynamic> e) => ContractPositionOptionEntity.fromJson(e)).toList() as M;
  261. }
  262. if (<ContractPositionRateDetailEntity>[] is M) {
  263. return data.map<ContractPositionRateDetailEntity>((Map<String, dynamic> e) => ContractPositionRateDetailEntity.fromJson(e)).toList() as M;
  264. }
  265. if (<ContractPositionRateSpecificOptionEntity>[] is M) {
  266. return data.map<ContractPositionRateSpecificOptionEntity>((Map<String, dynamic> e) => ContractPositionRateSpecificOptionEntity.fromJson(e)).toList() as M;
  267. }
  268. if (<ContractPositionRateTableEntity>[] is M) {
  269. return data.map<ContractPositionRateTableEntity>((Map<String, dynamic> e) => ContractPositionRateTableEntity.fromJson(e)).toList() as M;
  270. }
  271. if (<ContractPositionRateTableRows>[] is M) {
  272. return data.map<ContractPositionRateTableRows>((Map<String, dynamic> e) => ContractPositionRateTableRows.fromJson(e)).toList() as M;
  273. }
  274. if (<ContractPositionTableEntity>[] is M) {
  275. return data.map<ContractPositionTableEntity>((Map<String, dynamic> e) => ContractPositionTableEntity.fromJson(e)).toList() as M;
  276. }
  277. if (<ContractPositionTableRows>[] is M) {
  278. return data.map<ContractPositionTableRows>((Map<String, dynamic> e) => ContractPositionTableRows.fromJson(e)).toList() as M;
  279. }
  280. if (<ContractTableEntity>[] is M) {
  281. return data.map<ContractTableEntity>((Map<String, dynamic> e) => ContractTableEntity.fromJson(e)).toList() as M;
  282. }
  283. if (<ContractTableRows>[] is M) {
  284. return data.map<ContractTableRows>((Map<String, dynamic> e) => ContractTableRows.fromJson(e)).toList() as M;
  285. }
  286. if (<DeviceListEntity>[] is M) {
  287. return data.map<DeviceListEntity>((Map<String, dynamic> e) => DeviceListEntity.fromJson(e)).toList() as M;
  288. }
  289. if (<DeviceListRows>[] is M) {
  290. return data.map<DeviceListRows>((Map<String, dynamic> e) => DeviceListRows.fromJson(e)).toList() as M;
  291. }
  292. if (<FianceReportEntity>[] is M) {
  293. return data.map<FianceReportEntity>((Map<String, dynamic> e) => FianceReportEntity.fromJson(e)).toList() as M;
  294. }
  295. if (<FianceReportRateList>[] is M) {
  296. return data.map<FianceReportRateList>((Map<String, dynamic> e) => FianceReportRateList.fromJson(e)).toList() as M;
  297. }
  298. if (<HotelInfoEntity>[] is M) {
  299. return data.map<HotelInfoEntity>((Map<String, dynamic> e) => HotelInfoEntity.fromJson(e)).toList() as M;
  300. }
  301. if (<HotelInfoMenus>[] is M) {
  302. return data.map<HotelInfoMenus>((Map<String, dynamic> e) => HotelInfoMenus.fromJson(e)).toList() as M;
  303. }
  304. if (<HotelInfoMenusChildren>[] is M) {
  305. return data.map<HotelInfoMenusChildren>((Map<String, dynamic> e) => HotelInfoMenusChildren.fromJson(e)).toList() as M;
  306. }
  307. if (<IdNameEntity>[] is M) {
  308. return data.map<IdNameEntity>((Map<String, dynamic> e) => IdNameEntity.fromJson(e)).toList() as M;
  309. }
  310. if (<IndexOptionEntity>[] is M) {
  311. return data.map<IndexOptionEntity>((Map<String, dynamic> e) => IndexOptionEntity.fromJson(e)).toList() as M;
  312. }
  313. if (<JobAppliedEditIndexSGEntity>[] is M) {
  314. return data.map<JobAppliedEditIndexSGEntity>((Map<String, dynamic> e) => JobAppliedEditIndexSGEntity.fromJson(e)).toList() as M;
  315. }
  316. if (<JobAppliedEditIndexSGStatusList>[] is M) {
  317. return data.map<JobAppliedEditIndexSGStatusList>((Map<String, dynamic> e) => JobAppliedEditIndexSGStatusList.fromJson(e)).toList() as M;
  318. }
  319. if (<JobAppliedIndexSGEntity>[] is M) {
  320. return data.map<JobAppliedIndexSGEntity>((Map<String, dynamic> e) => JobAppliedIndexSGEntity.fromJson(e)).toList() as M;
  321. }
  322. if (<JobAppliedIndexSGStatusList>[] is M) {
  323. return data.map<JobAppliedIndexSGStatusList>((Map<String, dynamic> e) => JobAppliedIndexSGStatusList.fromJson(e)).toList() as M;
  324. }
  325. if (<JobAppliedListSGEntity>[] is M) {
  326. return data.map<JobAppliedListSGEntity>((Map<String, dynamic> e) => JobAppliedListSGEntity.fromJson(e)).toList() as M;
  327. }
  328. if (<JobAppliedListSGRows>[] is M) {
  329. return data.map<JobAppliedListSGRows>((Map<String, dynamic> e) => JobAppliedListSGRows.fromJson(e)).toList() as M;
  330. }
  331. if (<JobAppliedListSGRowsCheck>[] is M) {
  332. return data.map<JobAppliedListSGRowsCheck>((Map<String, dynamic> e) => JobAppliedListSGRowsCheck.fromJson(e)).toList() as M;
  333. }
  334. if (<JobAppliedListSGRowsStatusList>[] is M) {
  335. return data.map<JobAppliedListSGRowsStatusList>((Map<String, dynamic> e) => JobAppliedListSGRowsStatusList.fromJson(e)).toList() as M;
  336. }
  337. if (<JobAppliedRemarkViewSGEntity>[] is M) {
  338. return data.map<JobAppliedRemarkViewSGEntity>((Map<String, dynamic> e) => JobAppliedRemarkViewSGEntity.fromJson(e)).toList() as M;
  339. }
  340. if (<JobAppliedStaffSGEntity>[] is M) {
  341. return data.map<JobAppliedStaffSGEntity>((Map<String, dynamic> e) => JobAppliedStaffSGEntity.fromJson(e)).toList() as M;
  342. }
  343. if (<JobAppliedStaffSGRows>[] is M) {
  344. return data.map<JobAppliedStaffSGRows>((Map<String, dynamic> e) => JobAppliedStaffSGRows.fromJson(e)).toList() as M;
  345. }
  346. if (<JobListAddStaffEntity>[] is M) {
  347. return data.map<JobListAddStaffEntity>((Map<String, dynamic> e) => JobListAddStaffEntity.fromJson(e)).toList() as M;
  348. }
  349. if (<JobListAddStaffResultList>[] is M) {
  350. return data.map<JobListAddStaffResultList>((Map<String, dynamic> e) => JobListAddStaffResultList.fromJson(e)).toList() as M;
  351. }
  352. if (<JobListAppliedEditEntity>[] is M) {
  353. return data.map<JobListAppliedEditEntity>((Map<String, dynamic> e) => JobListAppliedEditEntity.fromJson(e)).toList() as M;
  354. }
  355. if (<JobListAppliedEditReasonList>[] is M) {
  356. return data.map<JobListAppliedEditReasonList>((Map<String, dynamic> e) => JobListAppliedEditReasonList.fromJson(e)).toList() as M;
  357. }
  358. if (<JobListAppliedInfoEntity>[] is M) {
  359. return data.map<JobListAppliedInfoEntity>((Map<String, dynamic> e) => JobListAppliedInfoEntity.fromJson(e)).toList() as M;
  360. }
  361. if (<JobListAppliedStaffListEntity>[] is M) {
  362. return data.map<JobListAppliedStaffListEntity>((Map<String, dynamic> e) => JobListAppliedStaffListEntity.fromJson(e)).toList() as M;
  363. }
  364. if (<JobListAppliedStaffListRows>[] is M) {
  365. return data.map<JobListAppliedStaffListRows>((Map<String, dynamic> e) => JobListAppliedStaffListRows.fromJson(e)).toList() as M;
  366. }
  367. if (<JobListAppliedStaffListRowsSecurityIn>[] is M) {
  368. return data.map<JobListAppliedStaffListRowsSecurityIn>((Map<String, dynamic> e) => JobListAppliedStaffListRowsSecurityIn.fromJson(e)).toList() as M;
  369. }
  370. if (<JobListAppliedStaffListRowsSecurityOut>[] is M) {
  371. return data.map<JobListAppliedStaffListRowsSecurityOut>((Map<String, dynamic> e) => JobListAppliedStaffListRowsSecurityOut.fromJson(e)).toList() as M;
  372. }
  373. if (<JobListAppliedStaffListRowsWorkIn>[] is M) {
  374. return data.map<JobListAppliedStaffListRowsWorkIn>((Map<String, dynamic> e) => JobListAppliedStaffListRowsWorkIn.fromJson(e)).toList() as M;
  375. }
  376. if (<JobListAppliedStaffListRowsWorkOut>[] is M) {
  377. return data.map<JobListAppliedStaffListRowsWorkOut>((Map<String, dynamic> e) => JobListAppliedStaffListRowsWorkOut.fromJson(e)).toList() as M;
  378. }
  379. if (<JobListAppliedStaffSearchEntity>[] is M) {
  380. return data.map<JobListAppliedStaffSearchEntity>((Map<String, dynamic> e) => JobListAppliedStaffSearchEntity.fromJson(e)).toList() as M;
  381. }
  382. if (<JobListAppliedStaffSearchRows>[] is M) {
  383. return data.map<JobListAppliedStaffSearchRows>((Map<String, dynamic> e) => JobListAppliedStaffSearchRows.fromJson(e)).toList() as M;
  384. }
  385. if (<JobListAppliedWorkFlowEntity>[] is M) {
  386. return data.map<JobListAppliedWorkFlowEntity>((Map<String, dynamic> e) => JobListAppliedWorkFlowEntity.fromJson(e)).toList() as M;
  387. }
  388. if (<JobListAppliedWorkFlowRecords>[] is M) {
  389. return data.map<JobListAppliedWorkFlowRecords>((Map<String, dynamic> e) => JobListAppliedWorkFlowRecords.fromJson(e)).toList() as M;
  390. }
  391. if (<JobListDetailEntity>[] is M) {
  392. return data.map<JobListDetailEntity>((Map<String, dynamic> e) => JobListDetailEntity.fromJson(e)).toList() as M;
  393. }
  394. if (<JobListDetailDepartmentList>[] is M) {
  395. return data.map<JobListDetailDepartmentList>((Map<String, dynamic> e) => JobListDetailDepartmentList.fromJson(e)).toList() as M;
  396. }
  397. if (<JobListEditIndexSGEntity>[] is M) {
  398. return data.map<JobListEditIndexSGEntity>((Map<String, dynamic> e) => JobListEditIndexSGEntity.fromJson(e)).toList() as M;
  399. }
  400. if (<JobListEditIndexOption>[] is M) {
  401. return data.map<JobListEditIndexOption>((Map<String, dynamic> e) => JobListEditIndexOption.fromJson(e)).toList() as M;
  402. }
  403. if (<JobListEntity>[] is M) {
  404. return data.map<JobListEntity>((Map<String, dynamic> e) => JobListEntity.fromJson(e)).toList() as M;
  405. }
  406. if (<JobListRows>[] is M) {
  407. return data.map<JobListRows>((Map<String, dynamic> e) => JobListRows.fromJson(e)).toList() as M;
  408. }
  409. if (<JobListIndexEntity>[] is M) {
  410. return data.map<JobListIndexEntity>((Map<String, dynamic> e) => JobListIndexEntity.fromJson(e)).toList() as M;
  411. }
  412. if (<JobListIndexDepartmentList>[] is M) {
  413. return data.map<JobListIndexDepartmentList>((Map<String, dynamic> e) => JobListIndexDepartmentList.fromJson(e)).toList() as M;
  414. }
  415. if (<JobListIndexStatusList>[] is M) {
  416. return data.map<JobListIndexStatusList>((Map<String, dynamic> e) => JobListIndexStatusList.fromJson(e)).toList() as M;
  417. }
  418. if (<JobListIndexSGEntity>[] is M) {
  419. return data.map<JobListIndexSGEntity>((Map<String, dynamic> e) => JobListIndexSGEntity.fromJson(e)).toList() as M;
  420. }
  421. if (<JobListIndexSGOption>[] is M) {
  422. return data.map<JobListIndexSGOption>((Map<String, dynamic> e) => JobListIndexSGOption.fromJson(e)).toList() as M;
  423. }
  424. if (<JobListRemarkViewEntity>[] is M) {
  425. return data.map<JobListRemarkViewEntity>((Map<String, dynamic> e) => JobListRemarkViewEntity.fromJson(e)).toList() as M;
  426. }
  427. if (<JobListSGEntity>[] is M) {
  428. return data.map<JobListSGEntity>((Map<String, dynamic> e) => JobListSGEntity.fromJson(e)).toList() as M;
  429. }
  430. if (<JobListSGRows>[] is M) {
  431. return data.map<JobListSGRows>((Map<String, dynamic> e) => JobListSGRows.fromJson(e)).toList() as M;
  432. }
  433. if (<JobTemplateEditIndexEntity>[] is M) {
  434. return data.map<JobTemplateEditIndexEntity>((Map<String, dynamic> e) => JobTemplateEditIndexEntity.fromJson(e)).toList() as M;
  435. }
  436. if (<JobTemplateEditIndexAgeList>[] is M) {
  437. return data.map<JobTemplateEditIndexAgeList>((Map<String, dynamic> e) => JobTemplateEditIndexAgeList.fromJson(e)).toList() as M;
  438. }
  439. if (<JobTemplateEditIndexSexList>[] is M) {
  440. return data.map<JobTemplateEditIndexSexList>((Map<String, dynamic> e) => JobTemplateEditIndexSexList.fromJson(e)).toList() as M;
  441. }
  442. if (<JobTemplateEditIndexLanguageList>[] is M) {
  443. return data.map<JobTemplateEditIndexLanguageList>((Map<String, dynamic> e) => JobTemplateEditIndexLanguageList.fromJson(e)).toList() as M;
  444. }
  445. if (<JobTemplateSGEntity>[] is M) {
  446. return data.map<JobTemplateSGEntity>((Map<String, dynamic> e) => JobTemplateSGEntity.fromJson(e)).toList() as M;
  447. }
  448. if (<JobTemplateSGRows>[] is M) {
  449. return data.map<JobTemplateSGRows>((Map<String, dynamic> e) => JobTemplateSGRows.fromJson(e)).toList() as M;
  450. }
  451. if (<JobTitleEditIndexEntity>[] is M) {
  452. return data.map<JobTitleEditIndexEntity>((Map<String, dynamic> e) => JobTitleEditIndexEntity.fromJson(e)).toList() as M;
  453. }
  454. if (<JobTitleEditIndexTemplate>[] is M) {
  455. return data.map<JobTitleEditIndexTemplate>((Map<String, dynamic> e) => JobTitleEditIndexTemplate.fromJson(e)).toList() as M;
  456. }
  457. if (<JobTitleSGEntity>[] is M) {
  458. return data.map<JobTitleSGEntity>((Map<String, dynamic> e) => JobTitleSGEntity.fromJson(e)).toList() as M;
  459. }
  460. if (<JobTitleSGRows>[] is M) {
  461. return data.map<JobTitleSGRows>((Map<String, dynamic> e) => JobTitleSGRows.fromJson(e)).toList() as M;
  462. }
  463. if (<LabourReportEntity>[] is M) {
  464. return data.map<LabourReportEntity>((Map<String, dynamic> e) => LabourReportEntity.fromJson(e)).toList() as M;
  465. }
  466. if (<LabourReportRows>[] is M) {
  467. return data.map<LabourReportRows>((Map<String, dynamic> e) => LabourReportRows.fromJson(e)).toList() as M;
  468. }
  469. if (<LabourReportTotal>[] is M) {
  470. return data.map<LabourReportTotal>((Map<String, dynamic> e) => LabourReportTotal.fromJson(e)).toList() as M;
  471. }
  472. if (<LabourReportVNEntity>[] is M) {
  473. return data.map<LabourReportVNEntity>((Map<String, dynamic> e) => LabourReportVNEntity.fromJson(e)).toList() as M;
  474. }
  475. if (<LabourReportVNRows>[] is M) {
  476. return data.map<LabourReportVNRows>((Map<String, dynamic> e) => LabourReportVNRows.fromJson(e)).toList() as M;
  477. }
  478. if (<LabourReportVNTotal>[] is M) {
  479. return data.map<LabourReportVNTotal>((Map<String, dynamic> e) => LabourReportVNTotal.fromJson(e)).toList() as M;
  480. }
  481. if (<LabourRequestEditIndexEntity>[] is M) {
  482. return data.map<LabourRequestEditIndexEntity>((Map<String, dynamic> e) => LabourRequestEditIndexEntity.fromJson(e)).toList() as M;
  483. }
  484. if (<LabourRequestEditIndexTemplateList>[] is M) {
  485. return data.map<LabourRequestEditIndexTemplateList>((Map<String, dynamic> e) => LabourRequestEditIndexTemplateList.fromJson(e)).toList() as M;
  486. }
  487. if (<LabourRequestEditIndexDepartmentList>[] is M) {
  488. return data.map<LabourRequestEditIndexDepartmentList>((Map<String, dynamic> e) => LabourRequestEditIndexDepartmentList.fromJson(e)).toList() as M;
  489. }
  490. if (<LabourRequestIndexEntity>[] is M) {
  491. return data.map<LabourRequestIndexEntity>((Map<String, dynamic> e) => LabourRequestIndexEntity.fromJson(e)).toList() as M;
  492. }
  493. if (<LabourRequestIndexDepartmentList>[] is M) {
  494. return data.map<LabourRequestIndexDepartmentList>((Map<String, dynamic> e) => LabourRequestIndexDepartmentList.fromJson(e)).toList() as M;
  495. }
  496. if (<LabourRequestIndexStatusList>[] is M) {
  497. return data.map<LabourRequestIndexStatusList>((Map<String, dynamic> e) => LabourRequestIndexStatusList.fromJson(e)).toList() as M;
  498. }
  499. if (<LabourRequestListEntity>[] is M) {
  500. return data.map<LabourRequestListEntity>((Map<String, dynamic> e) => LabourRequestListEntity.fromJson(e)).toList() as M;
  501. }
  502. if (<LabourRequestListRows>[] is M) {
  503. return data.map<LabourRequestListRows>((Map<String, dynamic> e) => LabourRequestListRows.fromJson(e)).toList() as M;
  504. }
  505. if (<LabourRequestWorkFlowEntity>[] is M) {
  506. return data.map<LabourRequestWorkFlowEntity>((Map<String, dynamic> e) => LabourRequestWorkFlowEntity.fromJson(e)).toList() as M;
  507. }
  508. if (<LabourRequestWorkFlowRecords>[] is M) {
  509. return data.map<LabourRequestWorkFlowRecords>((Map<String, dynamic> e) => LabourRequestWorkFlowRecords.fromJson(e)).toList() as M;
  510. }
  511. if (<LabourReviewListEntity>[] is M) {
  512. return data.map<LabourReviewListEntity>((Map<String, dynamic> e) => LabourReviewListEntity.fromJson(e)).toList() as M;
  513. }
  514. if (<LabourReviewListRows>[] is M) {
  515. return data.map<LabourReviewListRows>((Map<String, dynamic> e) => LabourReviewListRows.fromJson(e)).toList() as M;
  516. }
  517. if (<LabourReviewStatusEntity>[] is M) {
  518. return data.map<LabourReviewStatusEntity>((Map<String, dynamic> e) => LabourReviewStatusEntity.fromJson(e)).toList() as M;
  519. }
  520. if (<LabourReviewStatusRecords>[] is M) {
  521. return data.map<LabourReviewStatusRecords>((Map<String, dynamic> e) => LabourReviewStatusRecords.fromJson(e)).toList() as M;
  522. }
  523. if (<PositionTableEntity>[] is M) {
  524. return data.map<PositionTableEntity>((Map<String, dynamic> e) => PositionTableEntity.fromJson(e)).toList() as M;
  525. }
  526. if (<PositionTableRows>[] is M) {
  527. return data.map<PositionTableRows>((Map<String, dynamic> e) => PositionTableRows.fromJson(e)).toList() as M;
  528. }
  529. if (<ReviseIndexSGEntity>[] is M) {
  530. return data.map<ReviseIndexSGEntity>((Map<String, dynamic> e) => ReviseIndexSGEntity.fromJson(e)).toList() as M;
  531. }
  532. if (<ReviseIndexSGStatusList>[] is M) {
  533. return data.map<ReviseIndexSGStatusList>((Map<String, dynamic> e) => ReviseIndexSGStatusList.fromJson(e)).toList() as M;
  534. }
  535. if (<ReviseListSGEntity>[] is M) {
  536. return data.map<ReviseListSGEntity>((Map<String, dynamic> e) => ReviseListSGEntity.fromJson(e)).toList() as M;
  537. }
  538. if (<ReviseListSGRows>[] is M) {
  539. return data.map<ReviseListSGRows>((Map<String, dynamic> e) => ReviseListSGRows.fromJson(e)).toList() as M;
  540. }
  541. if (<ReviseLogSGEntity>[] is M) {
  542. return data.map<ReviseLogSGEntity>((Map<String, dynamic> e) => ReviseLogSGEntity.fromJson(e)).toList() as M;
  543. }
  544. if (<ReviseLogSGRecords>[] is M) {
  545. return data.map<ReviseLogSGRecords>((Map<String, dynamic> e) => ReviseLogSGRecords.fromJson(e)).toList() as M;
  546. }
  547. if (<ReviseLogSGRecordsContent>[] is M) {
  548. return data.map<ReviseLogSGRecordsContent>((Map<String, dynamic> e) => ReviseLogSGRecordsContent.fromJson(e)).toList() as M;
  549. }
  550. if (<ReviseLogSGRecordsOption>[] is M) {
  551. return data.map<ReviseLogSGRecordsOption>((Map<String, dynamic> e) => ReviseLogSGRecordsOption.fromJson(e)).toList() as M;
  552. }
  553. if (<SGAttendanceReviewOptionEntity>[] is M) {
  554. return data.map<SGAttendanceReviewOptionEntity>((Map<String, dynamic> e) => SGAttendanceReviewOptionEntity.fromJson(e)).toList() as M;
  555. }
  556. if (<SGAttendanceReviewTableEntity>[] is M) {
  557. return data.map<SGAttendanceReviewTableEntity>((Map<String, dynamic> e) => SGAttendanceReviewTableEntity.fromJson(e)).toList() as M;
  558. }
  559. if (<SGAttendanceReviewTableRows>[] is M) {
  560. return data.map<SGAttendanceReviewTableRows>((Map<String, dynamic> e) => SGAttendanceReviewTableRows.fromJson(e)).toList() as M;
  561. }
  562. if (<SGAttendanceReviewTableRowsCheck>[] is M) {
  563. return data.map<SGAttendanceReviewTableRowsCheck>((Map<String, dynamic> e) => SGAttendanceReviewTableRowsCheck.fromJson(e)).toList() as M;
  564. }
  565. if (<SGAttendanceReviewWorkflowEntity>[] is M) {
  566. return data.map<SGAttendanceReviewWorkflowEntity>((Map<String, dynamic> e) => SGAttendanceReviewWorkflowEntity.fromJson(e)).toList() as M;
  567. }
  568. if (<SGAttendanceReviewWorkflowRow>[] is M) {
  569. return data.map<SGAttendanceReviewWorkflowRow>((Map<String, dynamic> e) => SGAttendanceReviewWorkflowRow.fromJson(e)).toList() as M;
  570. }
  571. if (<SGAttendanceReviewWorkflowRecords>[] is M) {
  572. return data.map<SGAttendanceReviewWorkflowRecords>((Map<String, dynamic> e) => SGAttendanceReviewWorkflowRecords.fromJson(e)).toList() as M;
  573. }
  574. if (<SGDashboardEntity>[] is M) {
  575. return data.map<SGDashboardEntity>((Map<String, dynamic> e) => SGDashboardEntity.fromJson(e)).toList() as M;
  576. }
  577. if (<SGDashboardAgencyList>[] is M) {
  578. return data.map<SGDashboardAgencyList>((Map<String, dynamic> e) => SGDashboardAgencyList.fromJson(e)).toList() as M;
  579. }
  580. if (<SGDashboardAgencyListDays>[] is M) {
  581. return data.map<SGDashboardAgencyListDays>((Map<String, dynamic> e) => SGDashboardAgencyListDays.fromJson(e)).toList() as M;
  582. }
  583. if (<SGLabourRequestAddOptionEntity>[] is M) {
  584. return data.map<SGLabourRequestAddOptionEntity>((Map<String, dynamic> e) => SGLabourRequestAddOptionEntity.fromJson(e)).toList() as M;
  585. }
  586. if (<LabourRequestAgencyEntity>[] is M) {
  587. return data.map<LabourRequestAgencyEntity>((Map<String, dynamic> e) => LabourRequestAgencyEntity.fromJson(e)).toList() as M;
  588. }
  589. if (<SGLabourRequestDetailEntity>[] is M) {
  590. return data.map<SGLabourRequestDetailEntity>((Map<String, dynamic> e) => SGLabourRequestDetailEntity.fromJson(e)).toList() as M;
  591. }
  592. if (<SGLabourRequestDetailLabReq>[] is M) {
  593. return data.map<SGLabourRequestDetailLabReq>((Map<String, dynamic> e) => SGLabourRequestDetailLabReq.fromJson(e)).toList() as M;
  594. }
  595. if (<SGLabourRequestOptionEntity>[] is M) {
  596. return data.map<SGLabourRequestOptionEntity>((Map<String, dynamic> e) => SGLabourRequestOptionEntity.fromJson(e)).toList() as M;
  597. }
  598. if (<SGLabourRequestTableEntity>[] is M) {
  599. return data.map<SGLabourRequestTableEntity>((Map<String, dynamic> e) => SGLabourRequestTableEntity.fromJson(e)).toList() as M;
  600. }
  601. if (<SGLabourRequestTableRows>[] is M) {
  602. return data.map<SGLabourRequestTableRows>((Map<String, dynamic> e) => SGLabourRequestTableRows.fromJson(e)).toList() as M;
  603. }
  604. if (<SGLabourRequestWorlFlowEntity>[] is M) {
  605. return data.map<SGLabourRequestWorlFlowEntity>((Map<String, dynamic> e) => SGLabourRequestWorlFlowEntity.fromJson(e)).toList() as M;
  606. }
  607. if (<SGLabourRequestWorlFlowRow>[] is M) {
  608. return data.map<SGLabourRequestWorlFlowRow>((Map<String, dynamic> e) => SGLabourRequestWorlFlowRow.fromJson(e)).toList() as M;
  609. }
  610. if (<SGLabourRequestWorlFlowRecords>[] is M) {
  611. return data.map<SGLabourRequestWorlFlowRecords>((Map<String, dynamic> e) => SGLabourRequestWorlFlowRecords.fromJson(e)).toList() as M;
  612. }
  613. if (<SGLabourReviewOptionEntity>[] is M) {
  614. return data.map<SGLabourReviewOptionEntity>((Map<String, dynamic> e) => SGLabourReviewOptionEntity.fromJson(e)).toList() as M;
  615. }
  616. if (<SGLabourReviewTableEntity>[] is M) {
  617. return data.map<SGLabourReviewTableEntity>((Map<String, dynamic> e) => SGLabourReviewTableEntity.fromJson(e)).toList() as M;
  618. }
  619. if (<SGLabourReviewTableRows>[] is M) {
  620. return data.map<SGLabourReviewTableRows>((Map<String, dynamic> e) => SGLabourReviewTableRows.fromJson(e)).toList() as M;
  621. }
  622. if (<SignInSignOutEntity>[] is M) {
  623. return data.map<SignInSignOutEntity>((Map<String, dynamic> e) => SignInSignOutEntity.fromJson(e)).toList() as M;
  624. }
  625. if (<SignInSignOutRows>[] is M) {
  626. return data.map<SignInSignOutRows>((Map<String, dynamic> e) => SignInSignOutRows.fromJson(e)).toList() as M;
  627. }
  628. if (<StaffDetailEntity>[] is M) {
  629. return data.map<StaffDetailEntity>((Map<String, dynamic> e) => StaffDetailEntity.fromJson(e)).toList() as M;
  630. }
  631. if (<StaffDetailSGEntity>[] is M) {
  632. return data.map<StaffDetailSGEntity>((Map<String, dynamic> e) => StaffDetailSGEntity.fromJson(e)).toList() as M;
  633. }
  634. if (<StaffDetailSGReviews>[] is M) {
  635. return data.map<StaffDetailSGReviews>((Map<String, dynamic> e) => StaffDetailSGReviews.fromJson(e)).toList() as M;
  636. }
  637. if (<StaffDetailSGReviewsReviews>[] is M) {
  638. return data.map<StaffDetailSGReviewsReviews>((Map<String, dynamic> e) => StaffDetailSGReviewsReviews.fromJson(e)).toList() as M;
  639. }
  640. if (<StaffJobHistorySGEntity>[] is M) {
  641. return data.map<StaffJobHistorySGEntity>((Map<String, dynamic> e) => StaffJobHistorySGEntity.fromJson(e)).toList() as M;
  642. }
  643. if (<StaffJobHistorySGRows>[] is M) {
  644. return data.map<StaffJobHistorySGRows>((Map<String, dynamic> e) => StaffJobHistorySGRows.fromJson(e)).toList() as M;
  645. }
  646. if (<StaffLabourHistoryEntity>[] is M) {
  647. return data.map<StaffLabourHistoryEntity>((Map<String, dynamic> e) => StaffLabourHistoryEntity.fromJson(e)).toList() as M;
  648. }
  649. if (<StaffLabourHistoryRows>[] is M) {
  650. return data.map<StaffLabourHistoryRows>((Map<String, dynamic> e) => StaffLabourHistoryRows.fromJson(e)).toList() as M;
  651. }
  652. if (<StaffLabourHistoryRowsSecurityIn>[] is M) {
  653. return data.map<StaffLabourHistoryRowsSecurityIn>((Map<String, dynamic> e) => StaffLabourHistoryRowsSecurityIn.fromJson(e)).toList() as M;
  654. }
  655. if (<StaffLabourHistoryRowsSecurityOut>[] is M) {
  656. return data.map<StaffLabourHistoryRowsSecurityOut>((Map<String, dynamic> e) => StaffLabourHistoryRowsSecurityOut.fromJson(e)).toList() as M;
  657. }
  658. if (<StaffLabourHistoryRowsWorkIn>[] is M) {
  659. return data.map<StaffLabourHistoryRowsWorkIn>((Map<String, dynamic> e) => StaffLabourHistoryRowsWorkIn.fromJson(e)).toList() as M;
  660. }
  661. if (<StaffLabourHistoryRowsWorkOut>[] is M) {
  662. return data.map<StaffLabourHistoryRowsWorkOut>((Map<String, dynamic> e) => StaffLabourHistoryRowsWorkOut.fromJson(e)).toList() as M;
  663. }
  664. if (<StaffRemarkHistoryEntity>[] is M) {
  665. return data.map<StaffRemarkHistoryEntity>((Map<String, dynamic> e) => StaffRemarkHistoryEntity.fromJson(e)).toList() as M;
  666. }
  667. if (<StaffRemarkHistoryRows>[] is M) {
  668. return data.map<StaffRemarkHistoryRows>((Map<String, dynamic> e) => StaffRemarkHistoryRows.fromJson(e)).toList() as M;
  669. }
  670. if (<StaffReportVNEntity>[] is M) {
  671. return data.map<StaffReportVNEntity>((Map<String, dynamic> e) => StaffReportVNEntity.fromJson(e)).toList() as M;
  672. }
  673. if (<StaffRequestReportEntity>[] is M) {
  674. return data.map<StaffRequestReportEntity>((Map<String, dynamic> e) => StaffRequestReportEntity.fromJson(e)).toList() as M;
  675. }
  676. if (<StaffReviewHistorySGEntity>[] is M) {
  677. return data.map<StaffReviewHistorySGEntity>((Map<String, dynamic> e) => StaffReviewHistorySGEntity.fromJson(e)).toList() as M;
  678. }
  679. if (<StaffReviewHistorySGReviews>[] is M) {
  680. return data.map<StaffReviewHistorySGReviews>((Map<String, dynamic> e) => StaffReviewHistorySGReviews.fromJson(e)).toList() as M;
  681. }
  682. if (<SwitchProjectEntity>[] is M) {
  683. return data.map<SwitchProjectEntity>((Map<String, dynamic> e) => SwitchProjectEntity.fromJson(e)).toList() as M;
  684. }
  685. if (<SwitchProjectUserList>[] is M) {
  686. return data.map<SwitchProjectUserList>((Map<String, dynamic> e) => SwitchProjectUserList.fromJson(e)).toList() as M;
  687. }
  688. if (<UKAttendanceEntity>[] is M) {
  689. return data.map<UKAttendanceEntity>((Map<String, dynamic> e) => UKAttendanceEntity.fromJson(e)).toList() as M;
  690. }
  691. if (<UKAttendanceRows>[] is M) {
  692. return data.map<UKAttendanceRows>((Map<String, dynamic> e) => UKAttendanceRows.fromJson(e)).toList() as M;
  693. }
  694. if (<UKAttendanceInOut>[] is M) {
  695. return data.map<UKAttendanceInOut>((Map<String, dynamic> e) => UKAttendanceInOut.fromJson(e)).toList() as M;
  696. }
  697. if (<UKReportAttendanceEntity>[] is M) {
  698. return data.map<UKReportAttendanceEntity>((Map<String, dynamic> e) => UKReportAttendanceEntity.fromJson(e)).toList() as M;
  699. }
  700. if (<UKReportAttendanceRows>[] is M) {
  701. return data.map<UKReportAttendanceRows>((Map<String, dynamic> e) => UKReportAttendanceRows.fromJson(e)).toList() as M;
  702. }
  703. if (<UKReportLabourEntity>[] is M) {
  704. return data.map<UKReportLabourEntity>((Map<String, dynamic> e) => UKReportLabourEntity.fromJson(e)).toList() as M;
  705. }
  706. if (<UKReportLabourRows>[] is M) {
  707. return data.map<UKReportLabourRows>((Map<String, dynamic> e) => UKReportLabourRows.fromJson(e)).toList() as M;
  708. }
  709. if (<UKReportWorkingHoursEntity>[] is M) {
  710. return data.map<UKReportWorkingHoursEntity>((Map<String, dynamic> e) => UKReportWorkingHoursEntity.fromJson(e)).toList() as M;
  711. }
  712. if (<UKReportWorkingHoursRows>[] is M) {
  713. return data.map<UKReportWorkingHoursRows>((Map<String, dynamic> e) => UKReportWorkingHoursRows.fromJson(e)).toList() as M;
  714. }
  715. if (<UKSecurityAttendanceEntity>[] is M) {
  716. return data.map<UKSecurityAttendanceEntity>((Map<String, dynamic> e) => UKSecurityAttendanceEntity.fromJson(e)).toList() as M;
  717. }
  718. if (<UKSecurityAttendanceRows>[] is M) {
  719. return data.map<UKSecurityAttendanceRows>((Map<String, dynamic> e) => UKSecurityAttendanceRows.fromJson(e)).toList() as M;
  720. }
  721. if (<UKSecurityInOut>[] is M) {
  722. return data.map<UKSecurityInOut>((Map<String, dynamic> e) => UKSecurityInOut.fromJson(e)).toList() as M;
  723. }
  724. if (<UKSecurityAttendanceOptionEntity>[] is M) {
  725. return data.map<UKSecurityAttendanceOptionEntity>((Map<String, dynamic> e) => UKSecurityAttendanceOptionEntity.fromJson(e)).toList() as M;
  726. }
  727. if (<UKSecurityAttendanceOptionFilter>[] is M) {
  728. return data.map<UKSecurityAttendanceOptionFilter>((Map<String, dynamic> e) => UKSecurityAttendanceOptionFilter.fromJson(e)).toList() as M;
  729. }
  730. if (<UKTemplateDetailEntity>[] is M) {
  731. return data.map<UKTemplateDetailEntity>((Map<String, dynamic> e) => UKTemplateDetailEntity.fromJson(e)).toList() as M;
  732. }
  733. if (<UKTemplateDetailRow>[] is M) {
  734. return data.map<UKTemplateDetailRow>((Map<String, dynamic> e) => UKTemplateDetailRow.fromJson(e)).toList() as M;
  735. }
  736. if (<UKTemplateEntity>[] is M) {
  737. return data.map<UKTemplateEntity>((Map<String, dynamic> e) => UKTemplateEntity.fromJson(e)).toList() as M;
  738. }
  739. if (<UKTemplateRows>[] is M) {
  740. return data.map<UKTemplateRows>((Map<String, dynamic> e) => UKTemplateRows.fromJson(e)).toList() as M;
  741. }
  742. if (<ServerTime>[] is M) {
  743. return data.map<ServerTime>((Map<String, dynamic> e) => ServerTime.fromJson(e)).toList() as M;
  744. }
  745. debugPrint("$M not found");
  746. return null;
  747. }
  748. static M? fromJsonAsT<M>(dynamic json) {
  749. if (json is M) {
  750. return json;
  751. }
  752. if (json is List) {
  753. return _getListChildType<M>(json.map((dynamic e) => e as Map<String, dynamic>).toList());
  754. } else {
  755. return jsonConvert.convert<M>(json);
  756. }
  757. }
  758. }
  759. class JsonConvertClassCollection {
  760. Map<String, JsonConvertFunction> convertFuncMap = {
  761. (AddEditReviseViewSGEntity).toString(): AddEditReviseViewSGEntity.fromJson,
  762. (AgencyDetailEntity).toString(): AgencyDetailEntity.fromJson,
  763. (AgencyDetailPivot).toString(): AgencyDetailPivot.fromJson,
  764. (AgencyOptionEntity).toString(): AgencyOptionEntity.fromJson,
  765. (AgencyTableEntity).toString(): AgencyTableEntity.fromJson,
  766. (AgencyTableRows).toString(): AgencyTableRows.fromJson,
  767. (AttendanceEntity).toString(): AttendanceEntity.fromJson,
  768. (AttendanceList).toString(): AttendanceList.fromJson,
  769. (AttendanceReviewEntity).toString(): AttendanceReviewEntity.fromJson,
  770. (AttendanceReviewRows).toString(): AttendanceReviewRows.fromJson,
  771. (CheckSuccessEntity).toString(): CheckSuccessEntity.fromJson,
  772. (ContractDetailEntity).toString(): ContractDetailEntity.fromJson,
  773. (ContractDetailRow).toString(): ContractDetailRow.fromJson,
  774. (ContractOptionEntity).toString(): ContractOptionEntity.fromJson,
  775. (ContractPositionAddOptionEntity).toString(): ContractPositionAddOptionEntity.fromJson,
  776. (ContractPositionOptionEntity).toString(): ContractPositionOptionEntity.fromJson,
  777. (ContractPositionRateDetailEntity).toString(): ContractPositionRateDetailEntity.fromJson,
  778. (ContractPositionRateSpecificOptionEntity).toString(): ContractPositionRateSpecificOptionEntity.fromJson,
  779. (ContractPositionRateTableEntity).toString(): ContractPositionRateTableEntity.fromJson,
  780. (ContractPositionRateTableRows).toString(): ContractPositionRateTableRows.fromJson,
  781. (ContractPositionTableEntity).toString(): ContractPositionTableEntity.fromJson,
  782. (ContractPositionTableRows).toString(): ContractPositionTableRows.fromJson,
  783. (ContractTableEntity).toString(): ContractTableEntity.fromJson,
  784. (ContractTableRows).toString(): ContractTableRows.fromJson,
  785. (DeviceListEntity).toString(): DeviceListEntity.fromJson,
  786. (DeviceListRows).toString(): DeviceListRows.fromJson,
  787. (FianceReportEntity).toString(): FianceReportEntity.fromJson,
  788. (FianceReportRateList).toString(): FianceReportRateList.fromJson,
  789. (HotelInfoEntity).toString(): HotelInfoEntity.fromJson,
  790. (HotelInfoMenus).toString(): HotelInfoMenus.fromJson,
  791. (HotelInfoMenusChildren).toString(): HotelInfoMenusChildren.fromJson,
  792. (IdNameEntity).toString(): IdNameEntity.fromJson,
  793. (IndexOptionEntity).toString(): IndexOptionEntity.fromJson,
  794. (JobAppliedEditIndexSGEntity).toString(): JobAppliedEditIndexSGEntity.fromJson,
  795. (JobAppliedEditIndexSGStatusList).toString(): JobAppliedEditIndexSGStatusList.fromJson,
  796. (JobAppliedIndexSGEntity).toString(): JobAppliedIndexSGEntity.fromJson,
  797. (JobAppliedIndexSGStatusList).toString(): JobAppliedIndexSGStatusList.fromJson,
  798. (JobAppliedListSGEntity).toString(): JobAppliedListSGEntity.fromJson,
  799. (JobAppliedListSGRows).toString(): JobAppliedListSGRows.fromJson,
  800. (JobAppliedListSGRowsCheck).toString(): JobAppliedListSGRowsCheck.fromJson,
  801. (JobAppliedListSGRowsStatusList).toString(): JobAppliedListSGRowsStatusList.fromJson,
  802. (JobAppliedRemarkViewSGEntity).toString(): JobAppliedRemarkViewSGEntity.fromJson,
  803. (JobAppliedStaffSGEntity).toString(): JobAppliedStaffSGEntity.fromJson,
  804. (JobAppliedStaffSGRows).toString(): JobAppliedStaffSGRows.fromJson,
  805. (JobListAddStaffEntity).toString(): JobListAddStaffEntity.fromJson,
  806. (JobListAddStaffResultList).toString(): JobListAddStaffResultList.fromJson,
  807. (JobListAppliedEditEntity).toString(): JobListAppliedEditEntity.fromJson,
  808. (JobListAppliedEditReasonList).toString(): JobListAppliedEditReasonList.fromJson,
  809. (JobListAppliedInfoEntity).toString(): JobListAppliedInfoEntity.fromJson,
  810. (JobListAppliedStaffListEntity).toString(): JobListAppliedStaffListEntity.fromJson,
  811. (JobListAppliedStaffListRows).toString(): JobListAppliedStaffListRows.fromJson,
  812. (JobListAppliedStaffListRowsSecurityIn).toString(): JobListAppliedStaffListRowsSecurityIn.fromJson,
  813. (JobListAppliedStaffListRowsSecurityOut).toString(): JobListAppliedStaffListRowsSecurityOut.fromJson,
  814. (JobListAppliedStaffListRowsWorkIn).toString(): JobListAppliedStaffListRowsWorkIn.fromJson,
  815. (JobListAppliedStaffListRowsWorkOut).toString(): JobListAppliedStaffListRowsWorkOut.fromJson,
  816. (JobListAppliedStaffSearchEntity).toString(): JobListAppliedStaffSearchEntity.fromJson,
  817. (JobListAppliedStaffSearchRows).toString(): JobListAppliedStaffSearchRows.fromJson,
  818. (JobListAppliedWorkFlowEntity).toString(): JobListAppliedWorkFlowEntity.fromJson,
  819. (JobListAppliedWorkFlowRecords).toString(): JobListAppliedWorkFlowRecords.fromJson,
  820. (JobListDetailEntity).toString(): JobListDetailEntity.fromJson,
  821. (JobListDetailDepartmentList).toString(): JobListDetailDepartmentList.fromJson,
  822. (JobListEditIndexSGEntity).toString(): JobListEditIndexSGEntity.fromJson,
  823. (JobListEditIndexOption).toString(): JobListEditIndexOption.fromJson,
  824. (JobListEntity).toString(): JobListEntity.fromJson,
  825. (JobListRows).toString(): JobListRows.fromJson,
  826. (JobListIndexEntity).toString(): JobListIndexEntity.fromJson,
  827. (JobListIndexDepartmentList).toString(): JobListIndexDepartmentList.fromJson,
  828. (JobListIndexStatusList).toString(): JobListIndexStatusList.fromJson,
  829. (JobListIndexSGEntity).toString(): JobListIndexSGEntity.fromJson,
  830. (JobListIndexSGOption).toString(): JobListIndexSGOption.fromJson,
  831. (JobListRemarkViewEntity).toString(): JobListRemarkViewEntity.fromJson,
  832. (JobListSGEntity).toString(): JobListSGEntity.fromJson,
  833. (JobListSGRows).toString(): JobListSGRows.fromJson,
  834. (JobTemplateEditIndexEntity).toString(): JobTemplateEditIndexEntity.fromJson,
  835. (JobTemplateEditIndexAgeList).toString(): JobTemplateEditIndexAgeList.fromJson,
  836. (JobTemplateEditIndexSexList).toString(): JobTemplateEditIndexSexList.fromJson,
  837. (JobTemplateEditIndexLanguageList).toString(): JobTemplateEditIndexLanguageList.fromJson,
  838. (JobTemplateSGEntity).toString(): JobTemplateSGEntity.fromJson,
  839. (JobTemplateSGRows).toString(): JobTemplateSGRows.fromJson,
  840. (JobTitleEditIndexEntity).toString(): JobTitleEditIndexEntity.fromJson,
  841. (JobTitleEditIndexTemplate).toString(): JobTitleEditIndexTemplate.fromJson,
  842. (JobTitleSGEntity).toString(): JobTitleSGEntity.fromJson,
  843. (JobTitleSGRows).toString(): JobTitleSGRows.fromJson,
  844. (LabourReportEntity).toString(): LabourReportEntity.fromJson,
  845. (LabourReportRows).toString(): LabourReportRows.fromJson,
  846. (LabourReportTotal).toString(): LabourReportTotal.fromJson,
  847. (LabourReportVNEntity).toString(): LabourReportVNEntity.fromJson,
  848. (LabourReportVNRows).toString(): LabourReportVNRows.fromJson,
  849. (LabourReportVNTotal).toString(): LabourReportVNTotal.fromJson,
  850. (LabourRequestEditIndexEntity).toString(): LabourRequestEditIndexEntity.fromJson,
  851. (LabourRequestEditIndexTemplateList).toString(): LabourRequestEditIndexTemplateList.fromJson,
  852. (LabourRequestEditIndexDepartmentList).toString(): LabourRequestEditIndexDepartmentList.fromJson,
  853. (LabourRequestIndexEntity).toString(): LabourRequestIndexEntity.fromJson,
  854. (LabourRequestIndexDepartmentList).toString(): LabourRequestIndexDepartmentList.fromJson,
  855. (LabourRequestIndexStatusList).toString(): LabourRequestIndexStatusList.fromJson,
  856. (LabourRequestListEntity).toString(): LabourRequestListEntity.fromJson,
  857. (LabourRequestListRows).toString(): LabourRequestListRows.fromJson,
  858. (LabourRequestWorkFlowEntity).toString(): LabourRequestWorkFlowEntity.fromJson,
  859. (LabourRequestWorkFlowRecords).toString(): LabourRequestWorkFlowRecords.fromJson,
  860. (LabourReviewListEntity).toString(): LabourReviewListEntity.fromJson,
  861. (LabourReviewListRows).toString(): LabourReviewListRows.fromJson,
  862. (LabourReviewStatusEntity).toString(): LabourReviewStatusEntity.fromJson,
  863. (LabourReviewStatusRecords).toString(): LabourReviewStatusRecords.fromJson,
  864. (PositionTableEntity).toString(): PositionTableEntity.fromJson,
  865. (PositionTableRows).toString(): PositionTableRows.fromJson,
  866. (ReviseIndexSGEntity).toString(): ReviseIndexSGEntity.fromJson,
  867. (ReviseIndexSGStatusList).toString(): ReviseIndexSGStatusList.fromJson,
  868. (ReviseListSGEntity).toString(): ReviseListSGEntity.fromJson,
  869. (ReviseListSGRows).toString(): ReviseListSGRows.fromJson,
  870. (ReviseLogSGEntity).toString(): ReviseLogSGEntity.fromJson,
  871. (ReviseLogSGRecords).toString(): ReviseLogSGRecords.fromJson,
  872. (ReviseLogSGRecordsContent).toString(): ReviseLogSGRecordsContent.fromJson,
  873. (ReviseLogSGRecordsOption).toString(): ReviseLogSGRecordsOption.fromJson,
  874. (SGAttendanceReviewOptionEntity).toString(): SGAttendanceReviewOptionEntity.fromJson,
  875. (SGAttendanceReviewTableEntity).toString(): SGAttendanceReviewTableEntity.fromJson,
  876. (SGAttendanceReviewTableRows).toString(): SGAttendanceReviewTableRows.fromJson,
  877. (SGAttendanceReviewTableRowsCheck).toString(): SGAttendanceReviewTableRowsCheck.fromJson,
  878. (SGAttendanceReviewWorkflowEntity).toString(): SGAttendanceReviewWorkflowEntity.fromJson,
  879. (SGAttendanceReviewWorkflowRow).toString(): SGAttendanceReviewWorkflowRow.fromJson,
  880. (SGAttendanceReviewWorkflowRecords).toString(): SGAttendanceReviewWorkflowRecords.fromJson,
  881. (SGDashboardEntity).toString(): SGDashboardEntity.fromJson,
  882. (SGDashboardAgencyList).toString(): SGDashboardAgencyList.fromJson,
  883. (SGDashboardAgencyListDays).toString(): SGDashboardAgencyListDays.fromJson,
  884. (SGLabourRequestAddOptionEntity).toString(): SGLabourRequestAddOptionEntity.fromJson,
  885. (LabourRequestAgencyEntity).toString(): LabourRequestAgencyEntity.fromJson,
  886. (SGLabourRequestDetailEntity).toString(): SGLabourRequestDetailEntity.fromJson,
  887. (SGLabourRequestDetailLabReq).toString(): SGLabourRequestDetailLabReq.fromJson,
  888. (SGLabourRequestOptionEntity).toString(): SGLabourRequestOptionEntity.fromJson,
  889. (SGLabourRequestTableEntity).toString(): SGLabourRequestTableEntity.fromJson,
  890. (SGLabourRequestTableRows).toString(): SGLabourRequestTableRows.fromJson,
  891. (SGLabourRequestWorlFlowEntity).toString(): SGLabourRequestWorlFlowEntity.fromJson,
  892. (SGLabourRequestWorlFlowRow).toString(): SGLabourRequestWorlFlowRow.fromJson,
  893. (SGLabourRequestWorlFlowRecords).toString(): SGLabourRequestWorlFlowRecords.fromJson,
  894. (SGLabourReviewOptionEntity).toString(): SGLabourReviewOptionEntity.fromJson,
  895. (SGLabourReviewTableEntity).toString(): SGLabourReviewTableEntity.fromJson,
  896. (SGLabourReviewTableRows).toString(): SGLabourReviewTableRows.fromJson,
  897. (SignInSignOutEntity).toString(): SignInSignOutEntity.fromJson,
  898. (SignInSignOutRows).toString(): SignInSignOutRows.fromJson,
  899. (StaffDetailEntity).toString(): StaffDetailEntity.fromJson,
  900. (StaffDetailSGEntity).toString(): StaffDetailSGEntity.fromJson,
  901. (StaffDetailSGReviews).toString(): StaffDetailSGReviews.fromJson,
  902. (StaffDetailSGReviewsReviews).toString(): StaffDetailSGReviewsReviews.fromJson,
  903. (StaffJobHistorySGEntity).toString(): StaffJobHistorySGEntity.fromJson,
  904. (StaffJobHistorySGRows).toString(): StaffJobHistorySGRows.fromJson,
  905. (StaffLabourHistoryEntity).toString(): StaffLabourHistoryEntity.fromJson,
  906. (StaffLabourHistoryRows).toString(): StaffLabourHistoryRows.fromJson,
  907. (StaffLabourHistoryRowsSecurityIn).toString(): StaffLabourHistoryRowsSecurityIn.fromJson,
  908. (StaffLabourHistoryRowsSecurityOut).toString(): StaffLabourHistoryRowsSecurityOut.fromJson,
  909. (StaffLabourHistoryRowsWorkIn).toString(): StaffLabourHistoryRowsWorkIn.fromJson,
  910. (StaffLabourHistoryRowsWorkOut).toString(): StaffLabourHistoryRowsWorkOut.fromJson,
  911. (StaffRemarkHistoryEntity).toString(): StaffRemarkHistoryEntity.fromJson,
  912. (StaffRemarkHistoryRows).toString(): StaffRemarkHistoryRows.fromJson,
  913. (StaffReportVNEntity).toString(): StaffReportVNEntity.fromJson,
  914. (StaffRequestReportEntity).toString(): StaffRequestReportEntity.fromJson,
  915. (StaffReviewHistorySGEntity).toString(): StaffReviewHistorySGEntity.fromJson,
  916. (StaffReviewHistorySGReviews).toString(): StaffReviewHistorySGReviews.fromJson,
  917. (SwitchProjectEntity).toString(): SwitchProjectEntity.fromJson,
  918. (SwitchProjectUserList).toString(): SwitchProjectUserList.fromJson,
  919. (UKAttendanceEntity).toString(): UKAttendanceEntity.fromJson,
  920. (UKAttendanceRows).toString(): UKAttendanceRows.fromJson,
  921. (UKAttendanceInOut).toString(): UKAttendanceInOut.fromJson,
  922. (UKReportAttendanceEntity).toString(): UKReportAttendanceEntity.fromJson,
  923. (UKReportAttendanceRows).toString(): UKReportAttendanceRows.fromJson,
  924. (UKReportLabourEntity).toString(): UKReportLabourEntity.fromJson,
  925. (UKReportLabourRows).toString(): UKReportLabourRows.fromJson,
  926. (UKReportWorkingHoursEntity).toString(): UKReportWorkingHoursEntity.fromJson,
  927. (UKReportWorkingHoursRows).toString(): UKReportWorkingHoursRows.fromJson,
  928. (UKSecurityAttendanceEntity).toString(): UKSecurityAttendanceEntity.fromJson,
  929. (UKSecurityAttendanceRows).toString(): UKSecurityAttendanceRows.fromJson,
  930. (UKSecurityInOut).toString(): UKSecurityInOut.fromJson,
  931. (UKSecurityAttendanceOptionEntity).toString(): UKSecurityAttendanceOptionEntity.fromJson,
  932. (UKSecurityAttendanceOptionFilter).toString(): UKSecurityAttendanceOptionFilter.fromJson,
  933. (UKTemplateDetailEntity).toString(): UKTemplateDetailEntity.fromJson,
  934. (UKTemplateDetailRow).toString(): UKTemplateDetailRow.fromJson,
  935. (UKTemplateEntity).toString(): UKTemplateEntity.fromJson,
  936. (UKTemplateRows).toString(): UKTemplateRows.fromJson,
  937. (ServerTime).toString(): ServerTime.fromJson,
  938. };
  939. bool containsKey(String type) {
  940. return convertFuncMap.containsKey(type);
  941. }
  942. JsonConvertFunction? operator [](String key) {
  943. return convertFuncMap[key];
  944. }
  945. }