async def create(
        self,
        db: AsyncSession,
        *,
        obj_in: CreateSchemaType,
        current_user: User = None,
        uow: Optional[UnitOfWork] = None,
    ) -> ModelType:
        """Create a new object in db for a given schema type and optional user or assistant context.

        Args:
        ----
            db (AsyncSession): The database session.
            obj_in (CreateSchemaType): The object to create.
            current_user (User): The current user.
            uow (Optional[UnitOfWork]): The unit of work to use for the transaction.

        Returns:
        -------
            ModelType: The created object.

        """
        if not isinstance(obj_in, dict):
            obj_in = obj_in.model_dump(exclude_unset=True)
        db_obj = self.model(**obj_in)  # type: ignore

        if current_user:
            db_obj.created_by_email = current_user.email
            db_obj.modified_by_email = current_user.email
            db_obj.organization_id = current_user.organization_id

        db.add(db_obj)
        if not uow:
            await db.commit()
            await db.refresh(db_obj)
        return db_obj
Create a new object in db for a given schema type and optional user or assistant context.

        Args:
        ----
            db (AsyncSession): The database session.
            obj_in (CreateSchemaType): The object to create.
            current_user (User): The current user.
            uow (Optional[UnitOfWork]): The unit of work to use for the transaction.

        Returns:
        -------
            ModelType: The created object.

        
backend/airweave/crud/_base.py