product variants table split off from category variants table, variant values table updated to reflect
This commit is contained in:
@@ -10,7 +10,7 @@ use Cake\ORM\Entity;
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $product_sku_id
|
||||
* @property string $product_category_variant_id
|
||||
* @property string $product_variant_id
|
||||
* @property string $product_category_variant_option_id
|
||||
*
|
||||
* @property ProductSku $product_sku
|
||||
@@ -30,12 +30,12 @@ class ProductSkuVariantValue extends Entity
|
||||
*/
|
||||
protected array $_accessible = [
|
||||
'product_sku_id' => true,
|
||||
'product_category_variant_id' => true,
|
||||
'product_variant_id' => true,
|
||||
'product_category_variant_option_id' => true,
|
||||
|
||||
// entities
|
||||
'product_skus' => true,
|
||||
'product_category_variant' => true,
|
||||
'product_variant' => true,
|
||||
'product_category_variant_option' => true,
|
||||
];
|
||||
}
|
||||
|
||||
39
src/Model/Entity/ProductVariant.php
Normal file
39
src/Model/Entity/ProductVariant.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* ProductVariant Entity
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $name
|
||||
* @property string|null $product_category_variant_id
|
||||
* @property string $product_id
|
||||
* @property bool $enabled
|
||||
*
|
||||
* @property \App\Model\Entity\ProductCategoryVariant $product_category_variant
|
||||
* @property \App\Model\Entity\Product $product
|
||||
*/
|
||||
class ProductVariant 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 = [
|
||||
'name' => true,
|
||||
'product_category_variant_id' => true,
|
||||
'product_id' => true,
|
||||
'enabled' => true,
|
||||
'product_category_variant' => true,
|
||||
'product' => true,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user