23 lines
587 B
Dart
23 lines
587 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
import 'device_share.dart';
|
|
|
|
part 'device.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class DeviceModel {
|
|
String? name; //设备名称
|
|
String? id; //设备id
|
|
String? status; //设备状态
|
|
String? roomName; //设备所属房间
|
|
String? shareNum; //设备已分享数量
|
|
|
|
@JsonKey(ignore: true)
|
|
List<DeviceShareModel> shareInfo = []; //设备分享信息
|
|
|
|
DeviceModel();
|
|
static DeviceModel fromJson(Map<String, dynamic> json) =>
|
|
_$DeviceModelFromJson(json);
|
|
Map<String, dynamic> toJson() => _$DeviceModelToJson(this);
|
|
}
|