app.model.task_params module

class app.model.task_params.TasksParams(*, id=<factory>, created_at=<factory>, updated_at=<factory>, apiKey_used, oauth_user_id=None, key, value, taskId)[source]

Bases: BaseModel

Represents the parameters for a task, extending the functionality of the

BaseModel with task-specific fields.

Parameters:
  • id (Annotated[str, FieldInfoMetadata(primary_key=PydanticUndefined, nullable=PydanticUndefined, foreign_key=PydanticUndefined, ondelete=PydanticUndefined, unique=PydanticUndefined, index=PydanticUndefined, sa_type=UUID(), sa_column=PydanticUndefined, sa_column_args=PydanticUndefined, sa_column_kwargs={'primary_key': True, 'index': True})])

  • created_at (Annotated[datetime, FieldInfoMetadata(primary_key=PydanticUndefined, nullable=PydanticUndefined, foreign_key=PydanticUndefined, ondelete=PydanticUndefined, unique=PydanticUndefined, index=PydanticUndefined, sa_type=DateTime(timezone=True), sa_column=PydanticUndefined, sa_column_args=PydanticUndefined, sa_column_kwargs={'server_default': <sqlalchemy.sql.functions.now at 0x7fa8900484a0; now>})])

  • updated_at (Annotated[datetime, FieldInfoMetadata(primary_key=PydanticUndefined, nullable=PydanticUndefined, foreign_key=PydanticUndefined, ondelete=PydanticUndefined, unique=PydanticUndefined, index=PydanticUndefined, sa_type=DateTime(timezone=True), sa_column=PydanticUndefined, sa_column_args=PydanticUndefined, sa_column_kwargs={'server_default': <sqlalchemy.sql.functions.now at 0x7fa88fa2a840; now>, 'onupdate': <sqlalchemy.sql.functions.now at 0x7fa88fa2ad20; now>})])

key

The key name of the parameter, acting as a descriptive identifier.

Type:

str

value

The actual value of the parameter.

Type:

str

taskId

The unique identifier of the task associated with this parameter, serves as a foreign key linking to the tasks table.

Type:

str

__str__(self)[source]

Returns a human-readable string representation of the task parameter instance.

__repr__(self)[source]

Returns a more formal string representation suitable for debugging.

__eq__(self, other)[source]

Checks equality based on the task parameter’s key, value, and associated task ID.

__hash__(self)[source]

Generates a hash based on the key, value, and task ID, suitable for use in hash-based collections.

Configurations:
orm_mode (bool): Enables ORM compatibility mode, facilitating

integration with database ORM frameworks.

model_config: ClassVar[ConfigDict] = {'from_attributes': True, 'read_from_attributes': True, 'read_with_orm_mode': True, 'registry': PydanticUndefined, 'table': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].