import 'liveConsultation.m.dart'; import 'notification.m.dart'; import 'device.m.dart'; class CreateLabelRequest extends TokenRequest{ String? code; String? labelName; String? organizationCode; String? labelTypeKey; CreateLabelRequest({ this.code, this.labelName, this.organizationCode, this.labelTypeKey, String? token, }) : super( token: token, ); factory CreateLabelRequest.fromJson(Map map) { return CreateLabelRequest( code: map['Code'], labelName: map['LabelName'], organizationCode: map['OrganizationCode'], labelTypeKey: map['LabelTypeKey'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (labelName != null) map['LabelName'] = labelName; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (labelTypeKey != null) map['LabelTypeKey'] = labelTypeKey; return map; } } class LabelDTO extends BaseDTO{ String? code; String? labelName; String? organizationCode; String? labelTypeKey; LabelDTO({ this.code, this.labelName, this.organizationCode, this.labelTypeKey, DateTime? createTime, DateTime? updateTime, }) : super( createTime: createTime, updateTime: updateTime, ); factory LabelDTO.fromJson(Map map) { return LabelDTO( code: map['Code'], labelName: map['LabelName'], organizationCode: map['OrganizationCode'], labelTypeKey: map['LabelTypeKey'], createTime: map['CreateTime'] != null ? DateTime.parse(map['CreateTime']) : null, updateTime: map['UpdateTime'] != null ? DateTime.parse(map['UpdateTime']) : null, ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (labelName != null) map['LabelName'] = labelName; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (labelTypeKey != null) map['LabelTypeKey'] = labelTypeKey; return map; } } class GetLabelRequest extends TokenRequest{ String? code; GetLabelRequest({ this.code, String? token, }) : super( token: token, ); factory GetLabelRequest.fromJson(Map map) { return GetLabelRequest( code: map['Code'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; return map; } } class GetLabelByKeyRequest extends TokenRequest{ String? key; String? value; GetLabelByKeyRequest({ this.key, this.value, String? token, }) : super( token: token, ); factory GetLabelByKeyRequest.fromJson(Map map) { return GetLabelByKeyRequest( key: map['Key'], value: map['Value'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (key != null) map['Key'] = key; if (value != null) map['Value'] = value; return map; } } class LabelPageRequest extends PageRequest{ LabelPageRequest({ int pageIndex = 0, int pageSize = 0, String? token, }) : super( pageIndex: pageIndex, pageSize: pageSize, token: token, ); factory LabelPageRequest.fromJson(Map map) { return LabelPageRequest( pageIndex: map['PageIndex'], pageSize: map['PageSize'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); return map; } } class RemoveLabelRequest extends TokenRequest{ String? code; RemoveLabelRequest({ this.code, String? token, }) : super( token: token, ); factory RemoveLabelRequest.fromJson(Map map) { return RemoveLabelRequest( code: map['Code'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; return map; } } class GetLabelListRequest extends TokenRequest{ List? codes; GetLabelListRequest({ this.codes, String? token, }) : super( token: token, ); factory GetLabelListRequest.fromJson(Map map) { return GetLabelListRequest( codes: map['Codes']?.cast().toList(), token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (codes != null) map['Codes'] = codes; return map; } } class UpdateLabelRequest extends TokenRequest{ String? code; String? labelName; String? organizationCode; String? labelTypeKey; UpdateLabelRequest({ this.code, this.labelName, this.organizationCode, this.labelTypeKey, String? token, }) : super( token: token, ); factory UpdateLabelRequest.fromJson(Map map) { return UpdateLabelRequest( code: map['Code'], labelName: map['LabelName'], organizationCode: map['OrganizationCode'], labelTypeKey: map['LabelTypeKey'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (code != null) map['Code'] = code; if (labelName != null) map['LabelName'] = labelName; if (organizationCode != null) map['OrganizationCode'] = organizationCode; if (labelTypeKey != null) map['LabelTypeKey'] = labelTypeKey; return map; } } class GetLabelListByKeyRequest extends TokenRequest{ String? key; GetLabelListByKeyRequest({ this.key, String? token, }) : super( token: token, ); factory GetLabelListByKeyRequest.fromJson(Map map) { return GetLabelListByKeyRequest( key: map['Key'], token: map['Token'], ); } Map toJson() { final map = super.toJson(); if (key != null) map['Key'] = key; return map; } }