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

@ -7,12 +7,55 @@ part of 'fire_model.dart';
// ************************************************************************** // **************************************************************************
FireModel _$FireModelFromJson(Map<String, dynamic> json) => FireModel( FireModel _$FireModelFromJson(Map<String, dynamic> json) => FireModel(
model: json['model'] as String?, model: json['model'] as String,
communityCode: json['communityCode'] as String?, communityCode: json['communityCode'] as String,
alarmType: json['alarmType'] as int?, type: json['type'] as int,
alarmNo: json['alarmNo'] as String?, fireAlarm: json['fireAlarm'] == null
deviceNo: json['deviceNo'] as String?, ? null
deviceName: json['deviceName'] as String?, : FireAlarm.fromJson(json['fireAlarm'] as Map<String, dynamic>),
time: json['time'] as String?, deviceAlarm: json['deviceAlarm'] == null
alarmContent: json['alarmContent'] as String?, ? 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