mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-14 17:25:50 +00:00
fixed space creation api
This commit is contained in:
@ -0,0 +1,13 @@
|
||||
import 'package:syncrow_web/pages/spaces_management/space_model/models/tag_body_model.dart';
|
||||
|
||||
class CreateSubspaceModel {
|
||||
late String subspaceName;
|
||||
late List<CreateTagBodyModel>? tags;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'subspaceName': subspaceName,
|
||||
'tags': tags?.map((tag) => tag.toJson()).toList(),
|
||||
};
|
||||
}
|
||||
}
|
@ -24,7 +24,7 @@ class SpaceModel {
|
||||
SpaceStatus status;
|
||||
String internalId;
|
||||
SpaceTemplateModel? spaceModel;
|
||||
final List<Tag>? tags;
|
||||
List<Tag>? tags;
|
||||
List<SubspaceModel>? subspaces;
|
||||
|
||||
List<Connection> outgoingConnections = []; // Connections from this space
|
||||
|
@ -1,5 +1,6 @@
|
||||
import 'package:syncrow_web/pages/spaces_management/all_spaces/model/product_model.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/space_model/models/create_space_template_body_model.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/space_model/models/tag_body_model.dart';
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
class Tag {
|
||||
@ -58,4 +59,10 @@ extension TagModelExtensions on Tag {
|
||||
..tag = tag ?? ''
|
||||
..productUuid = product?.uuid;
|
||||
}
|
||||
|
||||
CreateTagBodyModel toCreateTagBodyModel() {
|
||||
return CreateTagBodyModel()
|
||||
..tag = tag ?? ''
|
||||
..productUuid = product?.uuid;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user