Work on abstracts
This commit is contained in:
@@ -81,6 +81,11 @@ class Event_Abstract_Base(BaseModel):
|
|||||||
created_on: Optional[datetime.datetime] = None
|
created_on: Optional[datetime.datetime] = None
|
||||||
updated_on: Optional[datetime.datetime] = None
|
updated_on: Optional[datetime.datetime] = None
|
||||||
|
|
||||||
|
# Including convenience data
|
||||||
|
# This is only for convenience. Probably going to keep unless it causes a problem.
|
||||||
|
event_session_code: Optional[str]
|
||||||
|
event_session_name: Optional[str]
|
||||||
|
|
||||||
# Including other related objects
|
# Including other related objects
|
||||||
# event: Optional[Event_Base]
|
# event: Optional[Event_Base]
|
||||||
event_file_list: Optional[list] # Optional[Event_File_Base]
|
event_file_list: Optional[list] # Optional[Event_File_Base]
|
||||||
@@ -224,6 +229,13 @@ class Event_Abstract_Base_New(Core_Std_Obj_Base):
|
|||||||
return redis_lookup_id_random(record_id_random=id_random, table_name='event_person')
|
return redis_lookup_id_random(record_id_random=id_random, table_name='event_person')
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
# @validator('event_session_id', always=True)
|
||||||
|
# def event_session_id_lookup(cls, v, values, **kwargs):
|
||||||
|
# if isinstance(v, int) and v > 0: return v
|
||||||
|
# elif id_random := values.get('event_session_id_random'):
|
||||||
|
# return redis_lookup_id_random(record_id_random=id_random, table_name='event_session')
|
||||||
|
# return None
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
underscore_attrs_are_private = True
|
underscore_attrs_are_private = True
|
||||||
allow_population_by_field_name = True
|
allow_population_by_field_name = True
|
||||||
@@ -302,11 +314,16 @@ class Event_Abstract_In(Event_Abstract_Base_New):
|
|||||||
|
|
||||||
|
|
||||||
# ### BEGIN ### API Event Abstract Models ### Event_Abstract_Ext() ###
|
# ### BEGIN ### API Event Abstract Models ### Event_Abstract_Ext() ###
|
||||||
# Update 2023-03-22
|
# Update 2023-09-22
|
||||||
class Event_Abstract_Ext(Event_Abstract_Base_New):
|
class Event_Abstract_Ext(Event_Abstract_Base_New):
|
||||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||||
log.debug(locals())
|
log.debug(locals())
|
||||||
|
|
||||||
|
# Including convenience data
|
||||||
|
# This is only for convenience. Probably going to keep unless it causes a problem.
|
||||||
|
event_session_code: Optional[str]
|
||||||
|
event_session_name: Optional[str]
|
||||||
|
|
||||||
# Including other related objects
|
# Including other related objects
|
||||||
# event: Optional[Event_Base]
|
# event: Optional[Event_Base]
|
||||||
event_cfg: Optional[Event_Cfg_Base]
|
event_cfg: Optional[Event_Cfg_Base]
|
||||||
|
|||||||
Reference in New Issue
Block a user