vitalOperationLog.m.dart 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. import 'liveConsultation.m.dart';
  2. import 'notification.m.dart';
  3. import 'device.m.dart';
  4. import 'package:fis_jsonrpc/utils.dart';
  5. class CreateOperationLogRequest extends TokenRequest{
  6. String? operation;
  7. DateTime? operationTime;
  8. int operationType;
  9. CreateOperationLogRequest({
  10. this.operation,
  11. this.operationTime,
  12. this.operationType = 0,
  13. String? token,
  14. }) : super(
  15. token: token,
  16. );
  17. factory CreateOperationLogRequest.fromJson(Map<String, dynamic> map) {
  18. return CreateOperationLogRequest(
  19. operation: map['Operation'],
  20. operationTime: map['OperationTime'] != null ? DateTime.parse(map['OperationTime']) : null,
  21. operationType: map['OperationType'],
  22. token: map['Token'],
  23. );
  24. }
  25. Map<String, dynamic> toJson() {
  26. final map = super.toJson();
  27. if (operation != null)
  28. map['Operation'] = operation;
  29. if (operationTime != null)
  30. map['OperationTime'] = JsonRpcUtils.dateFormat(operationTime!);
  31. map['OperationType'] = operationType;
  32. return map;
  33. }
  34. }
  35. class OperationLogDTO extends BaseDTO{
  36. String? code;
  37. String? operation;
  38. DateTime? operationTime;
  39. int operationType;
  40. OperationLogDTO({
  41. this.code,
  42. this.operation,
  43. this.operationTime,
  44. this.operationType = 0,
  45. DateTime? createTime,
  46. DateTime? updateTime,
  47. }) : super(
  48. createTime: createTime,
  49. updateTime: updateTime,
  50. );
  51. factory OperationLogDTO.fromJson(Map<String, dynamic> map) {
  52. return OperationLogDTO(
  53. code: map['Code'],
  54. operation: map['Operation'],
  55. operationTime: map['OperationTime'] != null ? DateTime.parse(map['OperationTime']) : null,
  56. operationType: map['OperationType'],
  57. createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null,
  58. updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null,
  59. );
  60. }
  61. Map<String, dynamic> toJson() {
  62. final map = super.toJson();
  63. if (code != null)
  64. map['Code'] = code;
  65. if (operation != null)
  66. map['Operation'] = operation;
  67. if (operationTime != null)
  68. map['OperationTime'] = JsonRpcUtils.dateFormat(operationTime!);
  69. map['OperationType'] = operationType;
  70. return map;
  71. }
  72. }
  73. class GetOperationLogRequest extends TokenRequest{
  74. String? code;
  75. GetOperationLogRequest({
  76. this.code,
  77. String? token,
  78. }) : super(
  79. token: token,
  80. );
  81. factory GetOperationLogRequest.fromJson(Map<String, dynamic> map) {
  82. return GetOperationLogRequest(
  83. code: map['Code'],
  84. token: map['Token'],
  85. );
  86. }
  87. Map<String, dynamic> toJson() {
  88. final map = super.toJson();
  89. if (code != null)
  90. map['Code'] = code;
  91. return map;
  92. }
  93. }
  94. class GetOperationLogByKeyRequest extends TokenRequest{
  95. String? key;
  96. String? value;
  97. GetOperationLogByKeyRequest({
  98. this.key,
  99. this.value,
  100. String? token,
  101. }) : super(
  102. token: token,
  103. );
  104. factory GetOperationLogByKeyRequest.fromJson(Map<String, dynamic> map) {
  105. return GetOperationLogByKeyRequest(
  106. key: map['Key'],
  107. value: map['Value'],
  108. token: map['Token'],
  109. );
  110. }
  111. Map<String, dynamic> toJson() {
  112. final map = super.toJson();
  113. if (key != null)
  114. map['Key'] = key;
  115. if (value != null)
  116. map['Value'] = value;
  117. return map;
  118. }
  119. }
  120. class OperationLogPageRequest extends PageRequest{
  121. OperationLogPageRequest({
  122. int pageIndex = 0,
  123. int pageSize = 0,
  124. String? token,
  125. }) : super(
  126. pageIndex: pageIndex,
  127. pageSize: pageSize,
  128. token: token,
  129. );
  130. factory OperationLogPageRequest.fromJson(Map<String, dynamic> map) {
  131. return OperationLogPageRequest(
  132. pageIndex: map['PageIndex'],
  133. pageSize: map['PageSize'],
  134. token: map['Token'],
  135. );
  136. }
  137. Map<String, dynamic> toJson() {
  138. final map = super.toJson();
  139. return map;
  140. }
  141. }
  142. class RemoveOperationLogRequest extends TokenRequest{
  143. String? code;
  144. RemoveOperationLogRequest({
  145. this.code,
  146. String? token,
  147. }) : super(
  148. token: token,
  149. );
  150. factory RemoveOperationLogRequest.fromJson(Map<String, dynamic> map) {
  151. return RemoveOperationLogRequest(
  152. code: map['Code'],
  153. token: map['Token'],
  154. );
  155. }
  156. Map<String, dynamic> toJson() {
  157. final map = super.toJson();
  158. if (code != null)
  159. map['Code'] = code;
  160. return map;
  161. }
  162. }
  163. class GetOperationLogListRequest extends TokenRequest{
  164. List<String>? codes;
  165. GetOperationLogListRequest({
  166. this.codes,
  167. String? token,
  168. }) : super(
  169. token: token,
  170. );
  171. factory GetOperationLogListRequest.fromJson(Map<String, dynamic> map) {
  172. return GetOperationLogListRequest(
  173. codes: map['Codes']?.cast<String>().toList(),
  174. token: map['Token'],
  175. );
  176. }
  177. Map<String, dynamic> toJson() {
  178. final map = super.toJson();
  179. if (codes != null)
  180. map['Codes'] = codes;
  181. return map;
  182. }
  183. }
  184. class UpdateOperationLogRequest extends TokenRequest{
  185. String? code;
  186. String? operation;
  187. DateTime? operationTime;
  188. int operationType;
  189. UpdateOperationLogRequest({
  190. this.code,
  191. this.operation,
  192. this.operationTime,
  193. this.operationType = 0,
  194. String? token,
  195. }) : super(
  196. token: token,
  197. );
  198. factory UpdateOperationLogRequest.fromJson(Map<String, dynamic> map) {
  199. return UpdateOperationLogRequest(
  200. code: map['Code'],
  201. operation: map['Operation'],
  202. operationTime: map['OperationTime'] != null ? DateTime.parse(map['OperationTime']) : null,
  203. operationType: map['OperationType'],
  204. token: map['Token'],
  205. );
  206. }
  207. Map<String, dynamic> toJson() {
  208. final map = super.toJson();
  209. if (code != null)
  210. map['Code'] = code;
  211. if (operation != null)
  212. map['Operation'] = operation;
  213. if (operationTime != null)
  214. map['OperationTime'] = JsonRpcUtils.dateFormat(operationTime!);
  215. map['OperationType'] = operationType;
  216. return map;
  217. }
  218. }