From 35202cb433acf79d3c23d84e8376651d58db3459 Mon Sep 17 00:00:00 2001
From: Yoann Schneider <yschneider@teklia.com>
Date: Mon, 29 Aug 2022 15:12:14 +0000
Subject: [PATCH] Create missing classes for Transcription, Corpus

---
 arkindex_worker/models.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/arkindex_worker/models.py b/arkindex_worker/models.py
index b6047aa7..b154cfa0 100644
--- a/arkindex_worker/models.py
+++ b/arkindex_worker/models.py
@@ -220,3 +220,21 @@ class Element(MagicDict):
         else:
             type_name = str(self.type)
         return "{} {} ({})".format(type_name, self.name, self.id)
+
+
+class Transcription(MagicDict):
+    """
+    Describes an Arkindex element's transcription.
+    """
+
+    def __str__(self):
+        return "Transcription ({})".format(self.id)
+
+
+class Corpus(MagicDict):
+    """
+    Describes an Arkindex corpus.
+    """
+
+    def __str__(self):
+        return "Corpus {} ({})".format(self.name, self.id)
-- 
GitLab