add/assign catalogs to an api when adding it

This commit is contained in:
2025-03-30 23:46:13 -07:00
parent b627550dd9
commit 1ebebede87
3 changed files with 163 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace CakeProducts\Model\Entity;
use Cake\I18n\DateTime;
use Cake\ORM\Entity;
/**
* ExternalProductCatalogsProductCatalog Entity
*
* @property int $id
* @property string $external_product_catalog_id
* @property string $product_catalog_id
* @property DateTime $created
* @property bool $enabled
*
* @property ExternalProductCatalog $external_product_catalog
* @property ProductCatalog $product_catalog
*/
class ExternalProductCatalogsProductCatalog extends Entity
{
/**
* Fields that can be mass assigned using newEntity() or patchEntity().
*
* Note that when '*' is set to true, this allows all unspecified fields to
* be mass assigned. For security purposes, it is advised to set '*' to false
* (or remove it), and explicitly make individual fields accessible as needed.
*
* @var array<string, bool>
*/
protected array $_accessible = [
'external_product_catalog_id' => true,
'product_catalog_id' => true,
'created' => true,
'enabled' => true,
'external_product_catalog' => true,
'product_catalog' => true,
];
}