aboutsummaryrefslogtreecommitdiff
path: root/gn3/db/metadata_audit.py
diff options
context:
space:
mode:
authorBonfaceKilz2021-06-03 11:08:58 +0300
committerzsloan2021-06-18 22:08:04 +0000
commitc96b29e63577f7189afd02df2ced26b150830341 (patch)
tree21fefb4bd88e9d497965a34e9f9ab4a57600bfd4 /gn3/db/metadata_audit.py
parent9d46f943894e15b4a70c64ecba6a3b684863a81f (diff)
downloadgenenetwork3-c96b29e63577f7189afd02df2ced26b150830341.tar.gz
Add data structures for the table metadata_audit
Diffstat (limited to 'gn3/db/metadata_audit.py')
-rw-r--r--gn3/db/metadata_audit.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/gn3/db/metadata_audit.py b/gn3/db/metadata_audit.py
new file mode 100644
index 0000000..6e22b32
--- /dev/null
+++ b/gn3/db/metadata_audit.py
@@ -0,0 +1,26 @@
+# pylint: disable=[R0902, R0903]
+"""This contains all the necessary functions that access the metadata_audit
+table from the db
+
+"""
+from dataclasses import dataclass
+from typing import Optional
+
+
+@dataclass(frozen=True)
+class MetadataAudit:
+ """Data Type that represents a Phenotype"""
+ dataset_id: int
+ editor: str
+ json_data: str
+ time_stamp: Optional[str] = None
+
+
+# Mapping from the MetadataAudit dataclass to the actual column names in the
+# database
+metadata_audit_mapping = {
+ "dataset_id": "dataset_id",
+ "editor": "editor",
+ "json_data": "json_data",
+ "time_stamp": "time_stamp",
+}