alrm model gernerate

pull/1/head
张萌 3 years ago
parent 462b90d663
commit 04a1baf442

@ -45,7 +45,7 @@ class FireModel extends Equatable {
class FireAlarm extends Equatable {
final String time;
final String deviceName;
factory FireAlarm.fromJson(Map<String, dynamic> json) =>_$FireAlarmFromJson(json);
@override
List<Object?> get props => [
time,
@ -62,7 +62,7 @@ class FireAlarm extends Equatable {
class DeviceAlarm extends Equatable {
final String time;
final String deviceName;
factory DeviceAlarm.fromJson(Map<String, dynamic> json) =>_$DeviceAlarmFromJson(json);
@override
List<Object?> get props => [
time,
@ -81,7 +81,7 @@ class OneButtonAlarm extends Equatable {
final String roomName;
final String name;
final String tel;
factory OneButtonAlarm.fromJson(Map<String, dynamic> json) =>_$OneButtonAlarmFromJson(json);
@override
List<Object?> get props => [
time,
@ -102,7 +102,7 @@ class OneButtonAlarm extends Equatable {
class ClientAlarm extends Equatable {
final String time;
final String content;
factory ClientAlarm.fromJson(Map<String, dynamic> json) =>_$ClientAlarmFromJson(json);
@override
List<Object?> get props => [
time,
@ -120,7 +120,7 @@ class ElderlyCareEquipmentReminder extends Equatable {
final String deviceNo;
final int deviceType;
final String content;
factory ElderlyCareEquipmentReminder.fromJson(Map<String, dynamic> json) =>_$ElderlyCareEquipmentReminderFromJson(json);
@override
List<Object?> get props => [
deviceNo,

@ -7,12 +7,55 @@ part of 'fire_model.dart';
// **************************************************************************
FireModel _$FireModelFromJson(Map<String, dynamic> json) => FireModel(
model: json['model'] as String?,
communityCode: json['communityCode'] as String?,
alarmType: json['alarmType'] as int?,
alarmNo: json['alarmNo'] as String?,
deviceNo: json['deviceNo'] as String?,
deviceName: json['deviceName'] as String?,
time: json['time'] as String?,
alarmContent: json['alarmContent'] as String?,
model: json['model'] as String,
communityCode: json['communityCode'] as String,
type: json['type'] as int,
fireAlarm: json['fireAlarm'] == null
? null
: FireAlarm.fromJson(json['fireAlarm'] as Map<String, dynamic>),
deviceAlarm: json['deviceAlarm'] == null
? null
: DeviceAlarm.fromJson(json['deviceAlarm'] as Map<String, dynamic>),
oneButtonAlarm: json['oneButtonAlarm'] == null
? null
: OneButtonAlarm.fromJson(
json['oneButtonAlarm'] as Map<String, dynamic>),
clientAlarm: json['clientAlarm'] == null
? null
: ClientAlarm.fromJson(json['clientAlarm'] as Map<String, dynamic>),
elderlyCareEquipmentReminder: json['elderlyCareEquipmentReminder'] == null
? null
: ElderlyCareEquipmentReminder.fromJson(
json['elderlyCareEquipmentReminder'] as Map<String, dynamic>),
);
FireAlarm _$FireAlarmFromJson(Map<String, dynamic> json) => FireAlarm(
time: json['time'] as String,
deviceName: json['deviceName'] as String,
);
DeviceAlarm _$DeviceAlarmFromJson(Map<String, dynamic> json) => DeviceAlarm(
time: json['time'] as String,
deviceName: json['deviceName'] as String,
);
OneButtonAlarm _$OneButtonAlarmFromJson(Map<String, dynamic> json) =>
OneButtonAlarm(
time: json['time'] as String,
roomName: json['roomName'] as String,
name: json['name'] as String,
tel: json['tel'] as String,
);
ClientAlarm _$ClientAlarmFromJson(Map<String, dynamic> json) => ClientAlarm(
time: json['time'] as String,
content: json['content'] as String,
);
ElderlyCareEquipmentReminder _$ElderlyCareEquipmentReminderFromJson(
Map<String, dynamic> json) =>
ElderlyCareEquipmentReminder(
deviceNo: json['deviceNo'] as String,
deviceType: json['deviceType'] as int,
content: json['content'] as String,
);

Loading…
Cancel
Save