|
@@ -1120,6 +1120,7 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
|
|
|
ControlDeviceParameterEnum controlType;
|
|
|
TransactionTypeEnum transactionType;
|
|
|
LoginSource loginSource;
|
|
|
+ String? deviceCode;
|
|
|
|
|
|
ConnectStatusToDeviceNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
@@ -1128,6 +1129,7 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
|
|
|
this.controlType = ControlDeviceParameterEnum.Start,
|
|
|
this.transactionType = TransactionTypeEnum.Consultion,
|
|
|
this.loginSource = LoginSource.PC,
|
|
|
+ this.deviceCode,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
|
}) : super(
|
|
@@ -1144,6 +1146,7 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
|
|
|
controlType: ControlDeviceParameterEnum.values.firstWhere((e) => e.index == map['ControlType']),
|
|
|
transactionType: TransactionTypeEnum.values.firstWhere((e) => e.index == map['TransactionType']),
|
|
|
loginSource: LoginSource.values.firstWhere((e) => e.index == map['LoginSource']),
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
|
);
|
|
@@ -1158,6 +1161,8 @@ class ConnectStatusToDeviceNotification extends NotificationDTO{
|
|
|
map['ControlType'] = controlType.index;
|
|
|
map['TransactionType'] = transactionType.index;
|
|
|
map['LoginSource'] = loginSource.index;
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
return map;
|
|
|
}
|
|
|
}
|
|
@@ -3950,10 +3955,12 @@ class PushDevicePatchToDeviceNotification extends NotificationDTO{
|
|
|
}
|
|
|
|
|
|
class RestartDeviceNotification extends NotificationDTO{
|
|
|
+ String? deviceCode;
|
|
|
String? controlUserCode;
|
|
|
|
|
|
RestartDeviceNotification({
|
|
|
NotificationTypeEnum notificationType = NotificationTypeEnum.Unknown,
|
|
|
+ this.deviceCode,
|
|
|
this.controlUserCode,
|
|
|
String? code,
|
|
|
bool isResponse = false,
|
|
@@ -3966,6 +3973,7 @@ class RestartDeviceNotification extends NotificationDTO{
|
|
|
factory RestartDeviceNotification.fromJson(Map<String, dynamic> map) {
|
|
|
return RestartDeviceNotification(
|
|
|
notificationType: NotificationTypeEnum.values.firstWhere((e) => e.index == map['NotificationType']),
|
|
|
+ deviceCode: map['DeviceCode'],
|
|
|
controlUserCode: map['ControlUserCode'],
|
|
|
code: map['Code'],
|
|
|
isResponse: map['IsResponse'],
|
|
@@ -3974,6 +3982,8 @@ class RestartDeviceNotification extends NotificationDTO{
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
final map = super.toJson();
|
|
|
+ if(deviceCode != null)
|
|
|
+ map['DeviceCode'] = deviceCode;
|
|
|
if(controlUserCode != null)
|
|
|
map['ControlUserCode'] = controlUserCode;
|
|
|
return map;
|