app.model.base_model module¶
- class app.model.base_model.BaseModel(*, id=<factory>, created_at=<factory>, updated_at=<factory>, apiKey_used=None, oauth_user_id=None)[source]¶
Bases:
SQLModelBase model class that provides ID, creation, and update timestamps.
- Parameters:
id (str)
created_at (datetime)
updated_at (datetime)
apiKey_used (str | None)
oauth_user_id (str | None)
- id¶
Unique identifier for each instance, automatically generated using UUID.
- Type:
str
- created_at¶
Timestamp recording when an instance is created, set to the current time by default.
- Type:
datetime
- updated_at¶
Timestamp recording the last update of an instance, set to the current time on creation and updates.
- Type:
datetime
- apiKey_used¶
The API key used for the instance.
- Type:
str
- oauth_user_id¶
The OAuth user ID associated with the instance.
- Type:
str
- Configurations:
- orm_mode (bool): Allows the model to be used with ORM, set to True to
enable.
- model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'registry': PydanticUndefined}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].