From fa1a9e71b3360789a16895bcad355827ad3b203e Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Fri, 8 Mar 2024 02:12:30 +0100
Subject: [PATCH] WIP: import

---
 src/linkahead/common/models.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/linkahead/common/models.py b/src/linkahead/common/models.py
index 2d9f22a8..d7701ac1 100644
--- a/src/linkahead/common/models.py
+++ b/src/linkahead/common/models.py
@@ -2026,7 +2026,7 @@ class Link(Record):
     """This class represents LinkAheads's link entities."""
 
     def __init__(self, name=None, id=None, description=None, path=None,
-                 target=None):
+                 target=None, import_file=False):
         Record.__init__(self, id=id, name=name, description=description)
         self.role = "Link"
         self.datatype = None
@@ -2035,6 +2035,8 @@ class Link(Record):
         # location in the fileserver
         self.path = path
 
+        self.import_file = import_file
+
     def to_xml(self, xml=None, add_properties=ALL, local_serialization=False):
         """Convert this Link to an xml element.
 
@@ -2058,7 +2060,8 @@ class Link(Record):
 class Directory(Record):
     """This class represents CaosDB's directory entities."""
 
-    def __init__(self, name=None, id=None, description=None, path=None):
+    def __init__(self, name=None, id=None, description=None, path=None,
+                 import_file=False, recursive_import=False):
         Record.__init__(self, id=id, name=name, description=description)
         self.role = "Directory"
         self.datatype = None
@@ -2066,6 +2069,9 @@ class Directory(Record):
         # location in the fileserver
         self.path = path
 
+        self.import_file = import_file
+        self.recursive_import = recursive_import
+
     def to_xml(self, xml=None, add_properties=ALL, local_serialization=False):
         """Convert this Directory to an xml element.
 
-- 
GitLab