|
|
|
|
@@ -42,9 +42,12 @@ class Event_Base(BaseModel):
|
|
|
|
|
lu_event_type_id: Optional[int]
|
|
|
|
|
#lu_event_type: Optional[str] # Needs to be reviewed
|
|
|
|
|
|
|
|
|
|
type_name: Optional[str] = Field(
|
|
|
|
|
alias = 'type'
|
|
|
|
|
)
|
|
|
|
|
conference: Optional[bool]
|
|
|
|
|
|
|
|
|
|
# type_name: Optional[str] = Field(
|
|
|
|
|
# alias = 'type'
|
|
|
|
|
# )
|
|
|
|
|
type: Optional[str]
|
|
|
|
|
|
|
|
|
|
name: Optional[str]
|
|
|
|
|
summary: Optional[str]
|
|
|
|
|
@@ -70,6 +73,7 @@ class Event_Base(BaseModel):
|
|
|
|
|
weekday_friday: Optional[bool]
|
|
|
|
|
weekday_saturday: Optional[bool]
|
|
|
|
|
|
|
|
|
|
address_location_id_random: Optional[str]
|
|
|
|
|
address_location_id: Optional[int]
|
|
|
|
|
location_text: Optional[str]
|
|
|
|
|
|
|
|
|
|
@@ -87,6 +91,19 @@ class Event_Base(BaseModel):
|
|
|
|
|
physical: Optional[bool] # physical in person event
|
|
|
|
|
virtual: Optional[bool] # virtual remote access event
|
|
|
|
|
|
|
|
|
|
contact_1_id_random: Optional[str]
|
|
|
|
|
contact_1_id: Optional[int]
|
|
|
|
|
contact_2_id_random: Optional[str]
|
|
|
|
|
contact_2_id: Optional[int]
|
|
|
|
|
contact_3_id_random: Optional[str]
|
|
|
|
|
contact_3_id: Optional[int]
|
|
|
|
|
|
|
|
|
|
attend_url: Optional[str]
|
|
|
|
|
attend_url_passcode: Optional[str]
|
|
|
|
|
attend_phone: Optional[str]
|
|
|
|
|
attend_phone_passcode: Optional[str]
|
|
|
|
|
attend_text: Optional[str]
|
|
|
|
|
|
|
|
|
|
# NOT FINISHED YET
|
|
|
|
|
|
|
|
|
|
# access_key: Optional[str] # Maybe use in the future?
|
|
|
|
|
@@ -182,6 +199,42 @@ class Event_Base(BaseModel):
|
|
|
|
|
return redis_lookup_id_random(record_id_random=values['user_id_random'], table_name='user')
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
@validator('address_location_id', always=True)
|
|
|
|
|
def address_location_id_lookup(cls, v, values, **kwargs):
|
|
|
|
|
log.setLevel(logging.WARNING)
|
|
|
|
|
log.debug(locals())
|
|
|
|
|
|
|
|
|
|
if values['address_location_id_random']:
|
|
|
|
|
return redis_lookup_id_random(record_id_random=values['address_location_id_random'], table_name='address')
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
@validator('contact_1_id', always=True)
|
|
|
|
|
def contact_1_id_lookup(cls, v, values, **kwargs):
|
|
|
|
|
log.setLevel(logging.WARNING)
|
|
|
|
|
log.debug(locals())
|
|
|
|
|
|
|
|
|
|
if values['contact_1_id_random']:
|
|
|
|
|
return redis_lookup_id_random(record_id_random=values['contact_1_id_random'], table_name='contact')
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
@validator('contact_2_id', always=True)
|
|
|
|
|
def contact_2_id_lookup(cls, v, values, **kwargs):
|
|
|
|
|
log.setLevel(logging.WARNING)
|
|
|
|
|
log.debug(locals())
|
|
|
|
|
|
|
|
|
|
if values['contact_2_id_random']:
|
|
|
|
|
return redis_lookup_id_random(record_id_random=values['contact_2_id_random'], table_name='contact')
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
@validator('contact_3_id', always=True)
|
|
|
|
|
def contact_3_id_lookup(cls, v, values, **kwargs):
|
|
|
|
|
log.setLevel(logging.WARNING)
|
|
|
|
|
log.debug(locals())
|
|
|
|
|
|
|
|
|
|
if values['contact_3_id_random']:
|
|
|
|
|
return redis_lookup_id_random(record_id_random=values['contact_3_id_random'], table_name='contact')
|
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
class Config:
|
|
|
|
|
underscore_attrs_are_private = True
|
|
|
|
|
allow_population_by_field_name = True
|
|
|
|
|
@@ -285,4 +338,4 @@ class Event_Cfg_Base(BaseModel):
|
|
|
|
|
# return redis_lookup_id_random(record_id_random=values['id_random'], table_name='event')
|
|
|
|
|
# return None
|
|
|
|
|
|
|
|
|
|
Event_Base.update_forward_refs() # NOTE: This is needed since Event_Cfg_Base is below Event_Base.
|
|
|
|
|
Event_Base.update_forward_refs() # NOTE: This is needed since Event_Cfg_Base is below Event_Base.
|
|
|
|
|
|