123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- import 'liveConsultation.m.dart';
- import 'notification.m.dart';
- import 'device.m.dart';
- import 'package:fis_jsonrpc/utils.dart';
- class CreateOperationLogRequest extends TokenRequest{
- String? operation;
- DateTime? operationTime;
- int operationType;
- CreateOperationLogRequest({
- this.operation,
- this.operationTime,
- this.operationType = 0,
- String? token,
- }) : super(
- token: token,
- );
- factory CreateOperationLogRequest.fromJson(Map<String, dynamic> map) {
- return CreateOperationLogRequest(
- operation: map['Operation'],
- operationTime: map['OperationTime'] != null ? DateTime.parse(map['OperationTime']) : null,
- operationType: map['OperationType'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (operation != null)
- map['Operation'] = operation;
- if (operationTime != null)
- map['OperationTime'] = JsonRpcUtils.dateFormat(operationTime!);
- map['OperationType'] = operationType;
- return map;
- }
- }
- class OperationLogDTO extends BaseDTO{
- String? code;
- String? operation;
- DateTime? operationTime;
- int operationType;
- OperationLogDTO({
- this.code,
- this.operation,
- this.operationTime,
- this.operationType = 0,
- DateTime? createTime,
- DateTime? updateTime,
- }) : super(
- createTime: createTime,
- updateTime: updateTime,
- );
- factory OperationLogDTO.fromJson(Map<String, dynamic> map) {
- return OperationLogDTO(
- code: map['Code'],
- operation: map['Operation'],
- operationTime: map['OperationTime'] != null ? DateTime.parse(map['OperationTime']) : null,
- operationType: map['OperationType'],
- 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 (code != null)
- map['Code'] = code;
- if (operation != null)
- map['Operation'] = operation;
- if (operationTime != null)
- map['OperationTime'] = JsonRpcUtils.dateFormat(operationTime!);
- map['OperationType'] = operationType;
- return map;
- }
- }
- class GetOperationLogRequest extends TokenRequest{
- String? code;
- GetOperationLogRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory GetOperationLogRequest.fromJson(Map<String, dynamic> map) {
- return GetOperationLogRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class GetOperationLogByKeyRequest extends TokenRequest{
- String? key;
- String? value;
- GetOperationLogByKeyRequest({
- this.key,
- this.value,
- String? token,
- }) : super(
- token: token,
- );
- factory GetOperationLogByKeyRequest.fromJson(Map<String, dynamic> map) {
- return GetOperationLogByKeyRequest(
- key: map['Key'],
- value: map['Value'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (key != null)
- map['Key'] = key;
- if (value != null)
- map['Value'] = value;
- return map;
- }
- }
- class OperationLogPageRequest extends PageRequest{
- OperationLogPageRequest({
- int pageIndex = 0,
- int pageSize = 0,
- String? token,
- }) : super(
- pageIndex: pageIndex,
- pageSize: pageSize,
- token: token,
- );
- factory OperationLogPageRequest.fromJson(Map<String, dynamic> map) {
- return OperationLogPageRequest(
- pageIndex: map['PageIndex'],
- pageSize: map['PageSize'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- return map;
- }
- }
- class RemoveOperationLogRequest extends TokenRequest{
- String? code;
- RemoveOperationLogRequest({
- this.code,
- String? token,
- }) : super(
- token: token,
- );
- factory RemoveOperationLogRequest.fromJson(Map<String, dynamic> map) {
- return RemoveOperationLogRequest(
- code: map['Code'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- return map;
- }
- }
- class GetOperationLogListRequest extends TokenRequest{
- List<String>? codes;
- GetOperationLogListRequest({
- this.codes,
- String? token,
- }) : super(
- token: token,
- );
- factory GetOperationLogListRequest.fromJson(Map<String, dynamic> map) {
- return GetOperationLogListRequest(
- codes: map['Codes']?.cast<String>().toList(),
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (codes != null)
- map['Codes'] = codes;
- return map;
- }
- }
- class UpdateOperationLogRequest extends TokenRequest{
- String? code;
- String? operation;
- DateTime? operationTime;
- int operationType;
- UpdateOperationLogRequest({
- this.code,
- this.operation,
- this.operationTime,
- this.operationType = 0,
- String? token,
- }) : super(
- token: token,
- );
- factory UpdateOperationLogRequest.fromJson(Map<String, dynamic> map) {
- return UpdateOperationLogRequest(
- code: map['Code'],
- operation: map['Operation'],
- operationTime: map['OperationTime'] != null ? DateTime.parse(map['OperationTime']) : null,
- operationType: map['OperationType'],
- token: map['Token'],
- );
- }
- Map<String, dynamic> toJson() {
- final map = super.toJson();
- if (code != null)
- map['Code'] = code;
- if (operation != null)
- map['Operation'] = operation;
- if (operationTime != null)
- map['OperationTime'] = JsonRpcUtils.dateFormat(operationTime!);
- map['OperationType'] = operationType;
- return map;
- }
- }
|