Zend certified PHP/Magento developer

How to filter products out with custom created field on catalog_product_entity

I have added 2 fields in db_schema.xml there created on table catalog_product_entity the challenges for me now are I’m using the one field as custom state and this state is the field I need to filter on.

here is my code

$products = $this->productCollection->create()
            ->addAttributeToSelect('*')
            ->addAttributeToFilter([
                [
                    'attribute' => 'status',
                    'eq' => MagentoCatalogModelProductAttributeSourceStatus::STATUS_ENABLED
                ],
            ])
            ->setPageSize($page_size)
            ->setCurPage($current_page);

The problem is coming when I’m adding the next filter like this

->addAttributeToFilter([
                    [
                        'attribute' => 'status',
                        'eq' => MagentoCatalogModelProductAttributeSourceStatus::STATUS_ENABLED
                    ],
[
                        'attribute' => 'my_state',
                        'nin' => 'custom-state'
                    ],
                ])

When I did it this way its tell me the attribute is invalid, but its exists in the table, I have doublet check my database tool

The "my_state" attribute name is invalid. Reset the name and try again