46 lines
1.4 KiB
PHP
46 lines
1.4 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace CakeProducts\Model\Entity;
|
|
|
|
use Cake\I18n\DateTime;
|
|
use Cake\ORM\Entity;
|
|
|
|
/**
|
|
* ProductAttribute Entity
|
|
*
|
|
* @property string $id
|
|
* @property string $product_id
|
|
* @property string $product_category_attribute_id
|
|
* @property string|null $attribute_value
|
|
* @property string|null $product_category_attribute_option_id
|
|
* @property DateTime|null $deleted
|
|
*
|
|
* @property Product $product
|
|
* @property ProductCategoryAttribute $product_category_attribute
|
|
* @property ProductCategoryAttributeOption $product_category_attribute_option
|
|
*/
|
|
class ProductAttribute 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_id' => true,
|
|
'product_category_attribute_id' => true,
|
|
'attribute_value' => true,
|
|
'product_category_attribute_option_id' => true,
|
|
'deleted' => true,
|
|
// entities
|
|
'product' => false,
|
|
'product_category_attribute' => false,
|
|
'product_category_attribute_option' => false,
|
|
];
|
|
}
|