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:json_annotation/json_annotation.dart';
|
||||||
|
import 'package:equatable/equatable.dart';
|
||||||
|
|
||||||
part 'fire_model.g.dart';
|
part 'fire_model.g.dart';
|
||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class FireModel {
|
class FireModel extends Equatable {
|
||||||
String? alarmNo;
|
final String model;
|
||||||
String? alarmType;
|
final String communityCode;
|
||||||
String? deviceName;
|
final int type;
|
||||||
String? deviceNo;
|
final FireAlarm? fireAlarm;
|
||||||
String? time;
|
final DeviceAlarm? deviceAlarm;
|
||||||
int? type;
|
final OneButtonAlarm? oneButtonAlarm;
|
||||||
|
final ClientAlarm? clientAlarm;
|
||||||
|
final ElderlyCareEquipmentReminder? elderlyCareEquipmentReminder;
|
||||||
|
|
||||||
factory FireModel.fromJson(Map<String, dynamic> json) =>
|
factory FireModel.fromJson(Map<String, dynamic> json) =>
|
||||||
_$FireModelFromJson(json);
|
_$FireModelFromJson(json);
|
||||||
|
|
||||||
FireModel({
|
@override
|
||||||
this.alarmNo,
|
List<Object?> get props => [
|
||||||
this.alarmType,
|
model,
|
||||||
this.deviceName,
|
communityCode,
|
||||||
this.deviceNo,
|
type,
|
||||||
this.time,
|
fireAlarm,
|
||||||
this.type,
|
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