initial commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
part 'remote_node.freezed.dart';
|
||||
part 'remote_node.g.dart';
|
||||
|
||||
/// Mirrors `models.RemoteNode` — an entry in this node's registry of
|
||||
/// sibling NodeMaster hosts (`/nodes/*`).
|
||||
@freezed
|
||||
sealed class RemoteNode with _$RemoteNode {
|
||||
const factory RemoteNode({
|
||||
@Default('') String id,
|
||||
required String name,
|
||||
required String url,
|
||||
@Default('') String status,
|
||||
String? description,
|
||||
@Default(<String>[]) List<String> tags,
|
||||
@JsonKey(name: 'last_seen') DateTime? lastSeen,
|
||||
}) = _RemoteNode;
|
||||
|
||||
factory RemoteNode.fromJson(Map<String, dynamic> json) => _$RemoteNodeFromJson(json);
|
||||
}
|
||||
Reference in New Issue
Block a user