variant options wip
This commit is contained in:
@@ -17,6 +17,7 @@ use Cake\ORM\Entity;
|
||||
*
|
||||
* @property ProductCategory|EntityInterface $product_category
|
||||
* @property Product|EntityInterface $product
|
||||
* @property ProductCategoryVariantOption[]|EntityInterface[] $product_category_variant_options
|
||||
*/
|
||||
class ProductCategoryVariant extends Entity
|
||||
{
|
||||
@@ -34,8 +35,10 @@ class ProductCategoryVariant extends Entity
|
||||
'product_category_id' => true,
|
||||
'product_id' => true,
|
||||
'enabled' => true,
|
||||
|
||||
// entities
|
||||
'product_category' => false,
|
||||
'product' => false,
|
||||
'product_category_variant_options' => true,
|
||||
];
|
||||
}
|
||||
|
||||
40
src/Model/Entity/ProductCategoryVariantOption.php
Normal file
40
src/Model/Entity/ProductCategoryVariantOption.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* ProductCategoryVariantOption Entity
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $product_category_variant_id
|
||||
* @property string $variant_value
|
||||
* @property \Cake\I18n\DateTime $created
|
||||
* @property \Cake\I18n\DateTime $modified
|
||||
* @property \Cake\I18n\DateTime|null $deleted
|
||||
*
|
||||
* @property \App\Model\Entity\ProductCategoryVariant $product_category_variant
|
||||
*/
|
||||
class ProductCategoryVariantOption 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 = [
|
||||
'product_category_variant_id' => true,
|
||||
'variant_value' => true,
|
||||
'created' => true,
|
||||
'modified' => true,
|
||||
'deleted' => true,
|
||||
// entities
|
||||
'product_category_variant' => false,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user