From dd9abe3499367c4eded4774ade1acbc90ef048b3 Mon Sep 17 00:00:00 2001
From: Timm Fitschen <t.fitschen@indiscale.com>
Date: Tue, 6 Jul 2021 21:19:23 +0200
Subject: [PATCH] WIP: basic entity properties

---
 proto/caosdb/entity/v1alpha1/main.proto | 40 ++++++++++++++++++++++++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/proto/caosdb/entity/v1alpha1/main.proto b/proto/caosdb/entity/v1alpha1/main.proto
index f7a446f..9001e4f 100644
--- a/proto/caosdb/entity/v1alpha1/main.proto
+++ b/proto/caosdb/entity/v1alpha1/main.proto
@@ -24,7 +24,32 @@ option  java_multiple_files = true;
 option  java_package        = "org.caosdb.api.entity.v1alpha1";
 package caosdb.entity.v1alpha1;
 
-// Entity message
+// Entity version
+message Version {
+  // Version id
+  string id = 1;
+}
+
+// Unit of a value or default unit of a Property
+message Unit {
+  // The string representation of the unit
+  string str = 1;
+}
+
+
+// Basic datatype. To be used as the datatype of a value or as the default datatype of a Property
+message BasicDatatype {
+  // Name of the basic datatype (e.g. integer, double, boolean)
+  string name = 1;
+}
+
+// Reference datatype. To be used as the datatype of a value or as the default datatype of a Property
+message ReferenceDatatype {
+  // The referenced record type
+  string reference = 1;
+}
+
+// Entity
 message Entity {
   // Entity ID
   string eid = 1;
@@ -32,6 +57,19 @@ message Entity {
   string name = 2;
   // Entity Description
   string description = 3;
+  // Entity Version
+  Version version = 4;
+  // Entity Role
+  string role = 5;
+  // Default unit (only used by Properties)
+  Unit unit = 6;
+  // Default datatype (only used by Properties)
+  oneof datatype {
+    // Basic datatype (e.g. integer, double)
+    BasicDatatype basic = 7;
+    // Reference datatype
+    ReferenceDatatype reference = 8;
+  };
 }
 
 // RetrieveRequest message
-- 
GitLab