mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 22:14:28 +01:00
Add SkillTreeEdge data model for skill tree
The SkillTreeEdge model represents the relationship between different skill nodes. It includes: - Edge ID - Source node ID - Destination node ID - Arrows property to indicate directionality
This commit is contained in:
23
frontend/lib/models/skill_tree/skill_tree_edge.dart
Normal file
23
frontend/lib/models/skill_tree/skill_tree_edge.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
class SkillTreeEdge {
|
||||
final String id;
|
||||
final String from;
|
||||
final String to;
|
||||
final String arrows;
|
||||
|
||||
SkillTreeEdge({
|
||||
required this.id,
|
||||
required this.from,
|
||||
required this.to,
|
||||
required this.arrows,
|
||||
});
|
||||
|
||||
// Optionally, add a factory constructor to initialize from JSON
|
||||
factory SkillTreeEdge.fromJson(Map<String, dynamic> json) {
|
||||
return SkillTreeEdge(
|
||||
id: json['id'],
|
||||
from: json['from'],
|
||||
to: json['to'],
|
||||
arrows: json['arrows'],
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user