rosemariafontana commited on
Commit
1617d68
·
verified ·
1 Parent(s): 5fe18d9

Update schema_classes.py

Browse files
Files changed (1) hide show
  1. schema_classes.py +9 -0
schema_classes.py CHANGED
@@ -34,6 +34,15 @@ class Role(str, Enum):
34
  STAFF = 'staff'
35
  AGRONOMIST = 'agronomist'
36
  OTHER = 'other'
 
 
 
 
 
 
 
 
 
37
 
38
  class Person(BaseModel):
39
  name: Union[str, None] = Field(..., title="Name", description="Name of this person")
 
34
  STAFF = 'staff'
35
  AGRONOMIST = 'agronomist'
36
  OTHER = 'other'
37
+
38
+ def description(self):
39
+ descriptions = {
40
+ 'partner': "A partner in the trial or interaction.",
41
+ 'staff': "Staff members working on the project.",
42
+ 'agronomist': "Agronomist providing expertise in the trial.",
43
+ 'other': "Other roles involved in the trial or interaction."
44
+ }
45
+ return descriptions.get(self.value, "No description available.")
46
 
47
  class Person(BaseModel):
48
  name: Union[str, None] = Field(..., title="Name", description="Name of this person")