parent
02305ecf2f
commit
336fcf35fc
@ -1,24 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'fall_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class FallModel {
|
||||
final String? userName;
|
||||
final String? tel;
|
||||
final String? address;
|
||||
final num? lon;
|
||||
final num? lat;
|
||||
final int? type;
|
||||
factory FallModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$FallModelFromJson(json);
|
||||
|
||||
const FallModel({
|
||||
this.userName,
|
||||
this.tel,
|
||||
this.address,
|
||||
this.lon,
|
||||
this.lat,
|
||||
this.type,
|
||||
});
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'fall_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
FallModel _$FallModelFromJson(Map<String, dynamic> json) => FallModel(
|
||||
userName: json['userName'] as String?,
|
||||
tel: json['tel'] as String?,
|
||||
address: json['address'] as String?,
|
||||
lon: json['lon'] as num?,
|
||||
lat: json['lat'] as num?,
|
||||
type: json['type'] as int?,
|
||||
);
|
@ -1,25 +1,136 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
part 'fire_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class FireModel {
|
||||
String? alarmNo;
|
||||
String? alarmType;
|
||||
String? deviceName;
|
||||
String? deviceNo;
|
||||
String? time;
|
||||
int? type;
|
||||
class FireModel extends Equatable {
|
||||
final String model;
|
||||
final String communityCode;
|
||||
final int type;
|
||||
final FireAlarm? fireAlarm;
|
||||
final DeviceAlarm? deviceAlarm;
|
||||
final OneButtonAlarm? oneButtonAlarm;
|
||||
final ClientAlarm? clientAlarm;
|
||||
final ElderlyCareEquipmentReminder? elderlyCareEquipmentReminder;
|
||||
|
||||
factory FireModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$FireModelFromJson(json);
|
||||
|
||||
FireModel({
|
||||
this.alarmNo,
|
||||
this.alarmType,
|
||||
this.deviceName,
|
||||
this.deviceNo,
|
||||
this.time,
|
||||
this.type,
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
model,
|
||||
communityCode,
|
||||
type,
|
||||
fireAlarm,
|
||||
deviceAlarm,
|
||||
oneButtonAlarm,
|
||||
clientAlarm,
|
||||
elderlyCareEquipmentReminder,
|
||||
];
|
||||
|
||||
const FireModel({
|
||||
required this.model,
|
||||
required this.communityCode,
|
||||
required this.type,
|
||||
this.fireAlarm,
|
||||
this.deviceAlarm,
|
||||
this.oneButtonAlarm,
|
||||
this.clientAlarm,
|
||||
this.elderlyCareEquipmentReminder,
|
||||
});
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
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,
|
||||
deviceName,
|
||||
];
|
||||
|
||||
const FireAlarm({
|
||||
required this.time,
|
||||
required this.deviceName,
|
||||
});
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
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,
|
||||
deviceName,
|
||||
];
|
||||
|
||||
const DeviceAlarm({
|
||||
required this.time,
|
||||
required this.deviceName,
|
||||
});
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class OneButtonAlarm extends Equatable {
|
||||
final String time;
|
||||
final String roomName;
|
||||
final String name;
|
||||
final String tel;
|
||||
factory OneButtonAlarm.fromJson(Map<String, dynamic> json) =>_$OneButtonAlarmFromJson(json);
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
time,
|
||||
roomName,
|
||||
name,
|
||||
tel,
|
||||
];
|
||||
|
||||
const OneButtonAlarm({
|
||||
required this.time,
|
||||
required this.roomName,
|
||||
required this.name,
|
||||
required this.tel,
|
||||
});
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
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,
|
||||
content,
|
||||
];
|
||||
|
||||
const ClientAlarm({
|
||||
required this.time,
|
||||
required this.content,
|
||||
});
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
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,
|
||||
deviceType,
|
||||
content,
|
||||
];
|
||||
|
||||
const ElderlyCareEquipmentReminder({
|
||||
required this.deviceNo,
|
||||
required this.deviceType,
|
||||
required this.content,
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in new issue