You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
904 B
36 lines
904 B
2 years ago
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||
|
|
||
|
part 'wiring.freezed.dart';
|
||
|
part 'wiring.g.dart';
|
||
|
|
||
|
@freezed
|
||
|
class Wiring with _$Wiring {
|
||
|
const factory Wiring({
|
||
|
required List<WiringInstance> instances,
|
||
|
required List<WiringWire> wires,
|
||
|
}) = _Wiring;
|
||
|
|
||
|
factory Wiring.fromJson(Map<String, dynamic> json) => _$WiringFromJson(json);
|
||
|
}
|
||
|
|
||
|
@freezed
|
||
|
class WiringInstance with _$WiringInstance {
|
||
|
const factory WiringInstance({
|
||
|
required String instanceId,
|
||
|
required String componentId,
|
||
|
}) = _WiringInstance;
|
||
|
|
||
|
factory WiringInstance.fromJson(Map<String, dynamic> json) => _$WiringInstanceFromJson(json);
|
||
|
}
|
||
|
|
||
|
@freezed
|
||
|
class WiringWire with _$WiringWire {
|
||
|
const factory WiringWire({
|
||
|
required String wireId,
|
||
|
required String output,
|
||
|
required String input,
|
||
|
}) = _WiringWire;
|
||
|
|
||
|
factory WiringWire.fromJson(Map<String, dynamic> json) => _$WiringWireFromJson(json);
|
||
|
}
|