about summary refs log tree commit diff
path: root/gn3/db/case_attributes.py
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/db/case_attributes.py')
-rw-r--r--gn3/db/case_attributes.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/gn3/db/case_attributes.py b/gn3/db/case_attributes.py
index bb15248..7b56bc4 100644
--- a/gn3/db/case_attributes.py
+++ b/gn3/db/case_attributes.py
@@ -1,10 +1,28 @@
 """Module that contains functions for editing case-attribute data"""
 from typing import Any, Optional, Tuple
+from dataclasses import dataclass
 
 import json
 import MySQLdb
 
 
+@dataclass
+class CaseAttributeEdit:
+    """Represents an edit operation for case attributes in the database.
+
+    Attributes:
+        inbredset_id (int): The ID of the inbred set associated with
+        the edit.
+        user_id (str): The ID of the user performing the edit.
+        changes (dict): A dictionary containing the changes to be
+    applied to the case attributes.
+
+    """
+    inbredset_id: int
+    user_id: str
+    changes: dict
+
+
 def get_case_attributes(conn) -> Optional[Tuple]:
     """Get all the case attributes from the database."""
     with conn.cursor() as cursor: