bring into standalone plugin for distribution
This commit is contained in:
35
src/Model/Entity/Product.php
Normal file
35
src/Model/Entity/Product.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace CakeProducts\Model\Entity;
|
||||
|
||||
use Cake\ORM\Entity;
|
||||
|
||||
/**
|
||||
* Product Entity
|
||||
*
|
||||
* @property string $id
|
||||
* @property string $name
|
||||
* @property string $product_category_id
|
||||
* @property \CakeProducts\Model\Enum\ProductProductTypeId $product_type_id
|
||||
*
|
||||
* @property \CakeProducts\Model\Entity\ProductCategory $product_category
|
||||
*/
|
||||
class Product 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_id' => true,
|
||||
'product_type_id' => true,
|
||||
'product_category' => true,
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user