Exhibitor tracking, badges, and ISHLT Impexium import related.

This commit is contained in:
Scott Idem
2023-02-08 18:32:13 -05:00
parent e43d7e061e
commit cbb5bea8c6
5 changed files with 25 additions and 7 deletions

View File

@@ -57,7 +57,13 @@ class Event_Exhibit_Base(BaseModel):
staff_limit: Optional[int]
hosted_file_limit: Optional[int]
tablet_qty: Optional[int] # NOTE: Tablets rented by exhibitor. This should be in a separate linked table. Something like event_device
leads_api_access: Optional[bool] # NOTE: API access and use
# Json type NOTE: All keys and values must be double quoted!
# {"field_name": "The field value"}
leads_custom_questions_json: Optional[Json] # NOTE: For now just using string instead of Json Pydantic data type. When getting the dict version for SQL this should be a string.
leads_device_sm_qty: Optional[int] # NOTE: Cell phone sized devices rented by exhibitor. Should this be a separate linked table (event_device)?
leads_device_lg_qty: Optional[int] # NOTE: Tablet (8 or 9 inch) sized devices rented by exhibitor. Should this be a separate linked table (event_device)?
enable_organization_name_change: Optional[bool]
enable_name_change: Optional[bool]
@@ -149,6 +155,15 @@ class Event_Exhibit_Base(BaseModel):
return redis_lookup_id_random(record_id_random=values['person_id_random'], table_name='person')
return None
# @validator('leads_custom_questions_json', always=True)
# def leads_custom_questions_json_fix(cls, v, values, **kwargs):
# if isinstance(v, str):
# return json.loads(v)
# # return v.dict()
# else:
# return v
# return None
class Config:
underscore_attrs_are_private = True
allow_population_by_field_name = True

View File

@@ -38,6 +38,7 @@ class Event_Exhibit_Tracking_Base(BaseModel):
event_badge_id: Optional[int]
exhibitor_notes: Optional[str]
responses_json: Optional[Json] # NOTE: Responses to custom questions
# json_data: Optional[str]
json_data: Optional[Json]