remove variant type id (enum) from variants table, use internal id for category field on variants form

This commit is contained in:
2025-06-30 21:25:47 -07:00
parent 5fb215c7fd
commit c9d34f7115
8 changed files with 10 additions and 52 deletions

View File

@@ -3,6 +3,7 @@ declare(strict_types=1);
namespace CakeProducts\Model\Entity;
use Cake\Datasource\EntityInterface;
use Cake\ORM\Entity;
/**
@@ -12,11 +13,10 @@ use Cake\ORM\Entity;
* @property string $name
* @property string|null $product_category_id
* @property string|null $product_id
* @property int $variant_type_id
* @property bool $enabled
*
* @property \App\Model\Entity\ProductCategory $product_category
* @property \App\Model\Entity\Product $product
* @property ProductCategory|EntityInterface $product_category
* @property Product|EntityInterface $product
*/
class ProductCategoryVariant extends Entity
{
@@ -33,9 +33,9 @@ class ProductCategoryVariant extends Entity
'name' => true,
'product_category_id' => true,
'product_id' => true,
'variant_type_id' => true,
'enabled' => true,
'product_category' => true,
'product' => true,
// entities
'product_category' => false,
'product' => false,
];
}