mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-16 10:06:16 +00:00
43 lines
814 B
Dart
43 lines
814 B
Dart
//{
|
|
// "code": "switch_1",
|
|
// "desc": "switch 1",
|
|
// "name": "switch 1",
|
|
// "type": "Boolean",
|
|
// "values": "{}"
|
|
// }
|
|
class FunctionModel {
|
|
String? code;
|
|
String? desc;
|
|
String? name;
|
|
String? type;
|
|
String? values;
|
|
|
|
FunctionModel({
|
|
required this.code,
|
|
required this.desc,
|
|
required this.name,
|
|
required this.type,
|
|
required this.values,
|
|
});
|
|
|
|
factory FunctionModel.fromJson(Map<String, dynamic> json) {
|
|
return FunctionModel(
|
|
code: json['code'],
|
|
desc: json['desc'],
|
|
name: json['name'],
|
|
type: json['type'],
|
|
values: json['values'],
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
return {
|
|
'code': code,
|
|
'desc': desc,
|
|
'name': name,
|
|
'type': type,
|
|
'values': values,
|
|
};
|
|
}
|
|
}
|