import 'package:syncrow_app/features/devices/model/device_model.dart'; class LightModel extends DeviceModel { final double brightness; final int color; final int lightingMode; LightModel({ required this.brightness, required this.color, required this.lightingMode, required super.id, required super.name, required super.type, required super.status, required super.location, required super.image, required super.timer, }); Map toJson() { return { 'luminance': brightness, 'color': color, 'lightingMode': lightingMode, 'timer': timer, 'id': id, 'name': name, 'status': status, 'type': type, 'location': location, 'image': image, }; } factory LightModel.fromJson(Map json) { return LightModel( id: json['id'], name: json['name'], status: json['status'], brightness: json['luminance'], color: json['color'], lightingMode: json['lightingMode'], timer: json['timer'], type: json['type'], location: json['location'], image: json['image'], ); } }